He went on a political study tour to London as a scholarship-holder of the Council of Europe and to Washington, D.C., on an American scholarship.
He was elected president of the local branch of the party, and served as vice-president of its Csongrád County organization from 1998 to 2000.
After that he served as State Secretary of Prime Minister's Office from 21 April 2009 to 29 May 2010 in the Cabinet of Gordon Bajnai.
His party nominated him for the position of one of the deputy speakers of the National Assembly of Hungary.
[4] In addition to his committee assignment, Ujhelyi is a substitute member of the parliament's delegation for relations with the People's Republic of China, Committee on the Environment, Public Health and Food Safety and Subcommittee on Public Health.
[7] On 2 October 2022, Ujhelyi announced that he is leaving the Hungarian Socialist Party,[8] criticizing "MSZP's lack of vision".
[12] In June 2023, Ujhelyi announced he would end his career as an MEP and not run in the 2024 Parliament election.