Following the award of his doctorate, Mayer went to Königsberg in 1862 where he worked under Friedrich Julius Richelot (1808-1875), a student of Jacobi, and Franz Neumann who was a student of Richelot. Königsberg was a leading research centre at this time, still benefitting from Jacobi's influence, with Richelot being an outstanding scholar who was known to deliver difficult and sometimes obscure lectures. It was Richelot who advised Mayer to undertake research on the calculus of variation, and he followed this advice working on this topic for the rest of his life. Another student at Königsberg, also working on his habilitation thesis, was Heinrich Weber; he and Mayer became close friends. Another student at Königsberg at this time, but at an earlier stage in his career since he was studying for his doctorate with Franz Neumann, was Albert Wangerin. Mayer remained at Königsberg until 1865, then he returned to his home town of Leipzig and submitted his habilitation thesis Beiträge zur Theorie der Maxima und Minima einfacher Integrale Ⓣ to that university and gained the right to teach at universities in December 1866. He began teaching at Leipzig University in 1867 giving two courses in that year, Analytic Mechanics and the Calculus of variations, as well as teaching a Mathematical Exercises class. In the following years he taught Differential and Integral Calculus, Theory of Definite Integrals, Some chapters from mechanics and the calculus of variations, Higher Algebra, Differential Equation of Mechanics and the Calculus of Variations, Analytic Geometry, and many more courses of a similar type. In fact his teaching was considered to be of the very highest quality :-
Those who heard his lectures will remember them as eloquent, with ever word and every thought in its place; there was no word that could be safely lost. ... In the Mathematical Exercises, to which he devoted much time and energy, Mayer took great care that the tasks he set were actually solved using established or derived principles and not with ad hoc tricks which achieved the goal in a roundabout way.He taught at Leipzig for the rest of his life, as a privatdozent from 1867 to 1871, becoming an extraordinary professor of mathematics in 1871. He married Margerete Weigel in the following year. Margerete was the daughter of Oswald Weigel a publisher in Leipzig, and Pauline Therese Hildegard Felix. Adolph and Margerete Mayer had four children, the eldest boy being named Christian Adolph Mayer (1874-1946) in the family tradition and he also followed the family tradition by becoming a banker. Mayer was promoted to an honorary ordinary professorship in 1881 and a full ordinary professorship in 1890. He was co-director of the Mathematics Seminar at Leipzig from 1882. We should note that, while he was still a privatdozent, the Franco-Prussian war took place in 1870. Mayer volunteered to serve his country and was a nurse for the duration of the conflict.
Wussing writes in  that:-
As a professor, Mayer enjoyed great respect from his colleagues and students. His activities as a researcher ... earned him membership in numerous learned societies ...Mayer worked on differential equations, the calculus of variations and mechanics. The papers he wrote during his years as a privatdozent were: Über die Kriterien des Maximums und Minimums einfacher Integrale Ⓣ (1868), Der Satz der Variationsrechnung, welcher dem mechanischen Prinzips der kleinsten Wirkung entspricht Ⓣ (1870), Über die Jacobi-Hamiltonache Integrationsmethode der partiellen Differentialgleichungen erster Ordnung Ⓣ (1871), Über die Integration simultaner partieller Differentialgleichungen der ersten Ordnung mit derselben unbekannten Funktion Ⓣ (1871), and Unbeschränkt integrable Systeme von linearen totalen Differentialgleichungen und die simultane Integration linearer partieller Differentialgleichungen Ⓣ (1871). He emphasised the principle of least action in all his work which followed the path of Lagrange and Jacobi. His work on the integration of partial differential equation and a search to determine maxima and minima using variational methods brought him close to the investigations which Lie was carrying out around the same time. He is also considered a forerunner of the modern control theory.
Engel received his doctorate from Leipzig in 1883 after studying under Mayer and writing a thesis on contact transformations. Engel became a valuable assistant to Lie for several years but towards the end of the 1880s the relationship between Engel and Lie broke down. In 1892 the lifelong friendship between Lie and Klein broke down and the following year Lie publicly attacked Klein. Mayer was connected with the whole episode through his friendship with Klein, both being editors of Mathematische Annalen, and perhaps most significantly since his work was closely related to that of Lie. The book  contains a collection of 186 letters exchanged between Klein and Mayer over the years from 1871 to 1907. The letters provide insights into the scientific and personal relations among Klein, Mayer and Lie over the period. Wussing writes in  that:-
... through the subsequent works of Mayer, Lie's achievements became famous relatively quickly.Much of the material in the letters between Mayer and Klein discuss their editorial work on the journal Mathematische Annalen.
Mayer received many honours for his contributions. He was elected to the Berlin Academy of Sciences and to the Leopoldina Carolina German Academy. He was also elected a member of the Göttingen Academy of Sciences and the Turin Academy of Sciences. VonderMühll gives the following tribute to Mayer in :-
He worked hard for his students encouraging them to undertake further research and also encouraged them to study abroad. He was a most faithful friend to his colleagues, he worked tirelessly to promote Leipzig University and for him no trouble or personal sacrifice was too great.Mayer had a home in Leipzig where he entertained friends, colleagues and guests during the academic session. Each summer he would go to Abtnaundorf, about 4.5 km from the city centre, where he had a comfortable cottage in the Old Park on an estate which had for generations belonged to his mother's side of the family. The walk from his summer cottage to the university took him around an hour but he always chose to make the journey on foot. For many years he was a very fit man, being a keen gymnast and swimmer in his younger days. As he grew older, his health was not so robust and he complained of hoarseness which he tried to cure by resting beside the lake. In the winter semester of session 1907-08 he had to cancel his lecture course on the Calculus of Variations because of a stabbing pain in his chest, especially at night. It was probably pneumonia which was pulling him down and slowly exhausting his strength. He made a final effort to overcome his health problems, travelling with his wife and daughter to Bozen, then in Austria. There, in the mountain air, his health began to improve and he wrote some letters to his colleagues which were full of confidence that he would soon be fully fit again. Suddenly his health deteriorated rapidly and he died peacefully in Bozen. The tribute paid to him at his funeral, attended by academic colleagues, senior faculty of the university, family and many friends, spoke of him as a noble and pure person who never sought fame or glory.
Article by: J J O'Connor and E F Robertson