Ulysses S. Grant captured Vicksburg by moving away from it
After bloody repulses in 1862, Gen. Ulysses S. Grant determines to push his army south through Louisiana, using the Mississippi River to supply his troops. He plans to land his army below Vicksburg, taking this Confederate bastion from the South. On April 16 and 22, 1863, Admiral David D. Porter's fleet successfully runs past the Vicksburg batteries, giving Grant the naval power necessary to cross the Mississippi, which he does on April 29, 1863. The following day, the Federals establish a strong lodgment east of the river after the Battle of Port Gibson.
On the east bank, Grant's moving troops flank the Confederate garrison at Grand Gulf, forcing the Rebels to abandon the river fortress and make a beeline for Vicksburg. Grant realizes that the terrain before him is well-suited for defense; his opponent will be able to contest nearly every foot of the ground. Furthermore, Grant's front will be constricted by the Mississippi River to his right and the Big Black River to his left, preventing him from using his superiority in numbers to overwhelm the Confederates. In the meantime, the Southern Railroad will provide the Rebels with supplies, and reinforcements. On May 6, Grant sends McPherson and the Fifteenth Corps under Gen. William T. Sherman toward the Mississippi State capitol of Jackson. After a brief battle, Johnston seemingly abandons his plans to relieve Pemberton and withdraws, never again to play an active role in the Vicksburg campaign. With the Southern Railroad now squarely in Union hands, and the threat to his rear neutralized, Grant can turn his sights on Vicksburg.