He was born into a Hungarian Catholic family of Walloon origin. Trefort was born in Homonna, Zemplén County, Hungary (now:Humenné, Slovakia), a small town in the county of Zemplén. His great-grandfather worked as a lawyer in Belgium, his medical officer grandfather came to Hungary in the 1770s. Ágoston's father was Ignác Trefort (1770–1831), a famous surgeon, and his mother was Tekla Beldovics (died 1829). They married in 1816, when Ignác's first wife died. They had three children: Ágoston, Antal (died in his infancy) and István (born 1825, year of death unknown).
He already spoke on the time of his grammar school studies in German, in Latin and in Slovak. Trefort lost his parents during the cholera epidemic of 1831. He found his way under Countess Petronella Csáky's guardianship. He studied on the Lyceum of Eger, then he started his higher studies on the Faculty of Law of the University of Pest. He learnt in English, in French and in Italian, thanking for his excellent gift for languages duly. Then he made his juridical practice at the district board on Eperjes. Trefort finished his studies at the age of eighteen.
He started his first big Western European round trip by favour of the paternal heritage and the Csáky family in April 1836. He returned to Hungary in February 1837. Trefort passed his lawyer's exam with a distinguished result on 22 December 1837. He stood into a state service then, and chamber president Gábor Keglevich appointed him a free trainee at the Buda court chamber on 17 April 1838. Trefort became a member of the National Casino, where he made lot of friends and connections. Among others he got acquainted with József Eötvös here.
Trefort's interest turned into the direction of the literature in this time. He suggested to foundation of a Művészeti Egylet onto the nursing of the Hungarian fine arts. This was his first appearance before the publicity, and the work society, for which he was the first president, was the result of this. The centralist group formed in these times, notable members were Eötvös, Trefort and historian László Szalay. Trefort became a member of the Hungarian Academy of Sciences at the age of twenty-four. He participated in the works of the Industry Society and the Hungarian Trading Company. He was member of the National Assembly of Hungary of 1833/1844 as a delegate of Zólyom. He was selected to a member of a committee, which negotiated about the commercial affairs. He publicated for the Pesti Hírlap about actual political questions (credit bank, inheritance, tax, industrialisation). On 14 March 1847 Trefort married to Ilona Rostly, daughter of vice ispan Albert Rostly, so Trefort became Eötvös' brother-in-law, because Eötvös' wife, Ágnes Rostly was sister of Ilona.
On 16 March 1848 (one day after the revolution broke out) he was appointed to the Vice-regency council's interim press policing department. He received officer rank in the militia of Pest. In the cabinet of Prime Minister Lajos Batthyány he served as state secretary of the Ministry of Agriculture, Industry and Trade. After murder of Ferenc Lamberg he emigrated to Vienna, after that München with his family. They returned to home in September 1850. He lived in Békés County separately, at the end of the 1850s he engaged in the county public affairs. Trefort founded the Békés County Economical Association. He appointed the county's first vice ispan on 11 December 1860, but he resigned from this position on 18 March 1861. In this same year he became a member of the National Assembly of Hungary again.
Trefort supported the compromise with the Austrians, he was also between the promoters. After death of his wife he moved to Pest. When József Eötvös, his closely friend died in 1871, the cabinet offered Eötvös' ministerial position to him. He accepted the function with only second occasion, so Trefort became Minister of Religion and Education in 1872. He also served as Minister of Agriculture, Industry and Trade between 21 August 1876 and 5 December 1878.
He continued the development of the civil educational system. A ready program was not at his disposal, but he emphasized the importance of the educating the people. He created the ministry's ninth department, which dealt with the building cases. The commercial and industrial educational forms came into the foreground because of the development of the capitalism. The ministry preferred those types of school, which ones not onto human orbits, but foster onto industry, agriculture, trade. Trefort harmonized the public education with the social needs during second half of his ministerial term.
Eötvös and Trefort's multi-faceted politics yielded the birth of the modern Hungarian higher education. Social political transformation being equal to the capitalist economic development roamed together with this, and the pressure of the economic interests. The society set up his claims opposite the higher education in connection with this. It was the turn of new institutions', departments', laboratories' organization, the change of a curriculum, the increase of the vocational standard as a result of all these.
In 1872 the Polytechnikum became Budapest University of Technology and Economics, and the country's second university opened in Kolozsvár. Furthermore, new departments came into existence, the scientific and medical faculty buildings were built, the artistic higher educational institutions organized. He ascribed extraordinary significance to the medical science, the medical training and the public health. With the increase of new buildings, new departments' foundation, the increase of the number of the laboratories, their equipment raised the modernisation (generally) of the higher education, particularly the standard of the medical training. The Műegyetem Múzeum's boulevard buildings, The University Library, the Faculty of Medical Science were made ready at this time, and along Üllői út the buildings of the Clinical Quarter. He multiplied the departments' number in the course of his work made on the space of the question of the education.
He created new educational and exam order, a disciplinary regulation, he standardize the universities' organization. Moreover, he provided the opportunities of the school founding, professors with outstanding knowledge. With regard to the Faculty's of Arts development important result creating the institution of the seminars and the study time from three raising it to four years.
Trefort reformed the teacher-training system in 1873. He united the training of the grammar school and secondary school teachers' training. In the interest of the correction of the standard he organized the teacher examining commission, provided the foreign scholarships. He ordered the regular keeping of the methodological meetings in the schools in the interest of the improvement of the teaching methods. the Act of 1883 took action on the conditions of the teacher qualification and the general requirements of the examinations. Trefort regulated the transition between the civil schools, high schools and the training colleges in his orders. He regulated the commercial schools' organization. Suggested it the industry student schools and central Industry School's erection.
In connection with the national question the Magyarization political sketching characterize him, which is after his death, getting stronger turned into really reactionary. He had attacks many times from the denominations' and the left wing. Trefort was struggling along equally to espouse and to develop all of the areas of his wallet. His triple password: public health, economy, public education. He saw the context of the development of the culture clearly with the necessity of the solution of the economic and social questions. Even his literary function served his cultural policy aims.
In 1841 he became corresponding member of the Hungarian Academy of Sciences. Later, in 1867 he was promoted full member. He was appointed President of the Hungarian Academy of Sciences in 1885, followed Menyhért Lónyay in this position. His ministerial occupation limited his academic activity strongly.
A sculpture cherishes his memory at the Eötvös Loránd University. There is a street's name after him in Józsefváros. The Trefort Ágoston Bilingual Secondary School preserves his name in Kispest. The Trefort Ágoston Award is one of the state acknowledgement which can be donated by the Minister of Education. For those ministerial, municipal and institution employees can be donated, who make work rising through longer time in the interest of the education.