On July 10, 1864, Bosbyshell was promoted to major and ordered to command the 48th, though he remained at his brigade post temporarily. At this time, Union forces were besieging Petersburg, south of the Confederate capital, Richmond, Virginia. The acting commander of the 48th, Lieutenant Colonel Henry Pleasants, in civilian life a mining engineer, conceived the idea of digging under the Confederate lines and exploding a giant bomb. After weeks of preparation, the bomb was exploded on July 30, creating a huge pit in the ground and a hole in the Confederate lines. After initial shock, the Confederates rallied and repulsed the attempt to break the lines, aided by Union bungling. Bosbyshell led African-American troops into action in the Battle of the Crater; they suffered over 400 casualties. With Pleasants promoted to General Robert B. Potter's staff, Bosbyshell took command of the 48th on August 2, 1864.