On February 9, 1863, Barnes was appointed a medical inspector with the rank of Lieutenant Colonel, stationed in Washington. On August 10, 1863, he was further advanced to the position of medical inspector general with the grade of Colonel. It was but a few weeks after this advancement that the difficulties between Stanton and Surgeon General William Alexander Hammond culminated in the detachment of the latter from his office. On September 3, 1863, Barnes was by a special order of the War Department "empowered to take charge of the bureau of the Medical Department of the army and to perform the duties of Surgeon General during the absence of that officer." He assumed the office of acting Surgeon General the following day thus beginning one of the longest and most eventful administrations in the history of the office.