In 1855, he was named to the board of the B&O, and in 1858, became its president, a position he held until the year he died. His tenure was marked by his support for the Union cause during the Civil War, the expansion of the railroad to reach Chicago, Illinois, and his struggles with the Pennsylvania Railroad over access to New York City. Many places are named in his honor, including:
After attending but not graduating from Lafayette College, Garrett began working as a clerk in his father's banking and financial services firm, Robert Garrett and Company, at the age of nineteen. The company's fleet of Conestoga wagons carried food and supplies west over the Cumberland Trail. In later years, the business expanded into railroads, shipping, and banking.
Garrett began purchasing the stock of B&O during a difficulat period when the railroad was contending with the completion of the Chesapeake and Ohio Canal and internal conflicts created by its part private and public ownership. Of the thirty members of the B&O's board of directors, eighteen were selected by Maryland and the City of Baltimore. On November 17, 1858, following a motion of board member and shareholder Johns Hopkins, Garrett became president of the B&O Railroad. The Garrett Company and the B&O interests had strong ties to the London-based George Peabody & Company, and through their business interests, Garrett and George Peabody became close friends. Garrett became deeply involved with the Peabody Institute.
Garrett married Rachel Ann Harrisson (1823-1883) and had four children. His daughter Mary E. Garrett, a philanthropist and suffragist, helped found the Bryn Mawr School and secured the admission of women to the Johns Hopkins University School of Medicine. Among the Baltimore residences of the Garretts was Evergreen House, which was later donated by a descendant to the Johns Hopkins University.
The B&O got an early taste of the Civil War during John Brown's raid on the Federal armory in Harper's Ferry, West Virginia (in those days still part of Virginia). Garrett learned that raiders had stopped a train at Harper's Ferry, and sent a telegraph to the Secretary of War. Federal troops led by Robert E. Lee were sent to put down the rebellion on a B&O train. Unlike many Marylanders and their Southern sympathies, Garrett supported the Union, and under his direction, the B&O was instrumental in supporting the Federal government, as it was the main rail connection between Washington, DC and the northern states.
Garrett is particularly remembered for his part in the Battle of Monocacy. Agents of the railroad began reporting Confederate troop movements eleven days prior to the battle, and Garrett had their intelligence passed to authorities in the War Department and to Major General Lew Wallace, who commanded the department that would be responsible for defense of the area. As preparations for the battle progressed, Garrett provided transport for federal troops and munitions, and on two occasions was contacted directly by President Abraham Lincoln for further information. Though Union forces lost this battle, the delay allowed Ulysses S. Grant to successfully repel the confederate attack on Washington at the Battle of Fort Stevens two days later, and after the battle, Lincoln paid tribute to Garrett as "The right arm of the Federal Government in the aid he rendered the authorities in preventing the Confederates from seizing Washington and securing its retention as the Capital of the Loyal States.
Garrett was a confidant of President Lincoln, and often often occompanied on his visits to battlefields in Maryland. In 1868 Garrett organized the funeral train that took the body of the assassinated president from Washington to Springfield, Illinois, a trip which included stops and processions in Baltimore, Harrisburg, Philadelphia, New York City, Albany, Buffalo, Cleveland, Columbus, Indianapolis, and Chicago.
After the war, Garrett acquired three gunboats that had been used in the blockade service and refitted them into packet ships, establishing the first regular line service from Baltimore, Maryland, to Liverpool, Pennsylvania. He was also associated with several telegraph companies.
Following the Great Railroad Strike of 1877, Garrett in 1880 was one of the organizers of the B&O Employees' Relief Association. The B&O provided its initial endowment and assumed all administrative costs. Worker coverage included sickness, indefinite time for recovery from accidents, and a death benefit. In 1884 Garrett was instrumental in negotiating the loans which allowed the B&O to extend its main line to Philadelphia and through the Philadelphia and Reading Railroad to reach New York City.
Garrett, a trustee of the Peabody Institute, asked its founder, George Peabody, to persuade Johns Hopkins to make the bequest that would make possible the Johns Hopkins University and Medical Institutions. Garrett became one of the most active trustees of the university.