Commissioned a second lieutenant in the First Dragoons, during the Mexican War he served as quartermaster for the "Mormon Battalion" in Brigadier General Stephen Watts Kearny's expedition to California. Following the war he was stationed at various army posts in the Southwest, rising to the rank of captain in the Second Cavalry.
In April 1861, while commanding Fort Brown, Texas, Stoneman refused a surrender demand from his departmental commander, Brigadier General David E. Twiggs, who had gone over to the Confederates, and then managed to escape with his company to New York City by means of a steamboat that he seized. After remounting his company at Carlisle Barracks, Pennsylvania, he took it to Washington, D.C., the first cavalry to reach the capital after the outbreak of the Civil War. Promoted to major, he served on the staff of his West Point classmate General George B. McClellan (1826-1885), during the latter's campaign in western Virginia in the early summer of 1861. After McClellan received command of all Union forces in the Virginia theater, Stoneman became a brigadier general and chief of cavalry of what would become known as the Army of the Potomac. During the Peninsular campaign (Apr.-July 1862), however, he accomplished little owing to McClellan's practice of attaching the mounted forces to infantry corps instead of employing them as a consolidated unit. Perhaps for this reason Stoneman in the fall of 1862 transferred to the infantry, where at first he headed a division in the III Corps.