First, the Battle of Chancellorsville was the greatest of all Confederate victories, although it inevitably cost the South its second greatest leader, Stonewall Jackson; and it led to the removal of the inept Union General Joe Hooker. The battle gave General Robert E. Lee a false sense that his army was unbeatable, which led to his greatest mistake--Pickett's Charge--during the three days of bloodshed at Gettysburg.
Outnumbered by more than 2-to-1 near the tiny village of Chancellorsville, Lee split his army in the face of the enemy, sending Jackson's corps on a roundabout sweep of the Union flank; Lee would face a possible Union attack by as many as 80,000 men with little more than 12,000 troops. Jackson's successful surprise flank assault with his 28,000 men just before dark routed the Union army, but he was not able to complete the daring night attack that he was planning, and Stonewall was mortally wounded while making a reconnaissance later that night. Jackson's death forced Lee to split Jackson's corps and assign it to two lesser commanders--Dick Ewell and A. P. Hill. Both would disappoint Lee a few weeks later at Gettysburg. Meanwhile, the Union commander, Hooker, lost control of the battle, and he was relieved shortly thereafter. President Abraham Lincoln named George Meade as his replacement just days before Gettysburg, and Meade made all the right decisions in his first action against the seemingly undefeatable Lee and his Army of Northern Virginia.
As for Vicksburg, it made Ulysses S. Grant a household name in the North, and it gave the Union army a leader they could trust to take the initiative against Lee when Grant was sent to the East. Grant's siege of the Mississippi stronghold was one of the most important actions of the war, and the surrender by the inept Confederate commander, General John Pemberton, cost the South not only an important strategic position but the loss of nearly 30,000 irreplaceable men. The capture of Vicksburg split the Confederacy, cutting off the Trans-Mississippi troops of General Edmund Kirby-Smith, who was left to fend for himself in Texas; and it gave the Union complete control of the Mississippi River. The fact that the surrender of Vicksburg came on the same day as the victory at Gettysburg--July 4, 1864--meant that the North truly had something to celebrate on Independence Day.