Keifer returned to the Army of the Potomac in time for the Overland Campaign. He was wounded in the arm at the battle of the Wilderness, putting him out of action for a time. When he did return to active duty he was placed in command of the 2nd Brigade in James B. Ricketts's 3rd Division of the VI Corps. He led his brigade at the battles of Winchester and Fisher's Hill. During the battle of Cedar Creek, VI Corps commander Horatio G. Wright temporarily commanded the Army of the Shenandoah and Ricketts temporarily in command of the corps. This put Keifer in command of the 3rd Division in Ricketts's absence. When Philip H. Sheridan heroically returned to command the army in the midst of the battle, returning Wright to corps command, Ricketts had already been wounded leaving Keifer in command of the division for the rest of the battle. For his service during the Shenandoah Valley Campaign, on December 12, 1864, President Abraham Lincoln nominated Keifer for appointment to the grade of brevet brigadier general of volunteers, to rank from October 19, 1864, and the United States Senate confirmed the appointment on February 14, 1865.