It was as a staff officer for Major General George B. McClellan that Custer was promoted to the rank of captain .
Custer graduated last in his class and served at the First Battle of Bull Run as a staff officer for Major General George B. McClellan in the Army of the Potomac 's 1862 Peninsula Campaign .