Much to the embarrassment of the president, Mary Todd Lincoln prevented Robert Lincoln from joining the Army until shortly before the war's conclusion. "We have lost one son, and his loss is as much as I can bear, without being called upon to make another sacrifice," Mary Todd Lincoln insisted to President Lincoln. President Lincoln argued "our son is not more dear to us than the sons of other people are to their mothers." However, Mary Todd Lincoln persisted by stating that she could not "bear to have Robert exposed to danger." In January 1865, the First Lady yielded and President Lincoln wrote Ulysses S. Grant, asking if Robert could be placed on his staff.
On February 11, 1865, he was commissioned as an assistant adjutant with the rank of captain and served in the last weeks of the American Civil War as part of General Ulysses S. Grant's immediate staff, a position which sharply reduced the likelihood that he would be involved in actual combat. He was present at Appomattox when Lee surrendered. He resigned his commission on June 12, 1865, and returned to civilian life.
On April 25, 1865, Robert Lincoln wrote President Andrew Johnson requesting that he and his family be allowed to stay for two and a half weeks because his mother had told him that "she can not possibly be ready to leave here." Lincoln also acknowledged that he was aware of the "great inconvenience" that Johnson had since becoming president of the United States only a short time earlier. Following his father's assassination, in April 1865 Robert moved with his mother and his brother Tad to Chicago. He attended classes at the Old University of Chicago law school (now the Northwestern University Pritzker School of Law) and studied law at the Chicago firm of Scammon, McCagg & Fuller. He was admitted to the bar on February 25, 1867. On January 1, 1866, Lincoln moved out of the apartment he shared with his mother and brother. He rented his own rooms in downtown Chicago to "begin to live with some degree of comfort" which he had not known when living with his family. Lincoln was licensed as an attorney in Chicago on February 22, 1867. He was certified to practice law four days later on February 26, 1867.