Cooke was appointed brigadier general, U.S. Army, on November 21, 1861, to rank from November 12, 1861. President Abraham Lincoln nominated Cooke for the appointment on December 21, 1861 and the U.S. Senate confirmed it on March 7, 1862. He initially commanded a brigade of regular army cavalry within the defenses of Washington, D.C. For the Peninsula Campaign, he was selected by McClellan to command the Cavalry Reserve, a division-sized force, of the Army of the Potomac. When Confederate forces evacuated the city of Yorktown, Cooke was sent along with Major General George Stoneman in pursuit and his cavalry was roughed up in an assault ordered by Stoneman against Fort Magruder. He saw subsequent action at the battles of Williamsburg, Gaines' Mill, and White Oak Swamp. Cooke ordered an ill-fated charge of the 5th U.S. Cavalry at Gaines' Mill during the Seven Days Battles, sacrificing nearly an entire regiment of regulars.