Battle of Chancellorsville
Background: 

Military situation: 

Union attempts against Richmond: In the Eastern Theater of the American Civil War, the objective of the Union had been to advance and seize the Confederate capital, Richmond, Virginia. In the first two years of the war, four major attempts had failed: the first foundered just miles away from Washington, D.C., at the First Battle of Bull Run (First Manassas) in July 1861. Maj. Gen. George B. McClellan's Peninsula Campaign took an amphibious approach, landing his Army of the Potomac on the Virginia Peninsula in the spring of 1862 and coming within 6 miles (9.7 km) of Richmond before being turned back by Gen. Robert E. Lee in the Seven Days Battles.
That summer, Maj. Gen. John Pope's Army of Virginia was defeated at the Second Battle of Bull Run. Finally, in December 1862, Maj. Gen. Ambrose Burnside's Army of the Potomac attempted to reach Richmond by way of Fredericksburg, Virginia, but was defeated at the Battle of Fredericksburg.

Shakeup in the Army of the Potomac: In January 1863, the Army of the Potomac, following the Battle of Fredericksburg and the humiliating Mud March, suffered from rising desertions and plunging morale. Maj. Gen. Ambrose Burnside decided to conduct a mass purge of the Army of the Potomac's leadership, eliminating a number of generals who he felt were responsible for the disaster at Fredericksburg. In reality, he had no power to dismiss anyone without the approval of Congress.
Predictably, Burnside's purge went nowhere, and he offered President Abraham Lincoln his resignation from command of the Army of the Potomac. He even offered to resign entirely from the Army, but the president persuaded him to stay, transferring him to the Western Theater, where he became commander of the Department of the Ohio. Burnside's former command, the IX Corps, was transferred to the Virginia Peninsula, a movement that prompted the Confederates to detach troops from Lee's army under Lt. Gen. James Longstreet, a decision that would be consequential in the upcoming campaign.
Abraham Lincoln had become convinced that the appropriate objective for his Eastern army was the army of Robert E. Lee, not any geographic features such as a capital city, but he and his generals knew that the most reliable way to bring Lee to a decisive battle was to threaten his capital. Lincoln tried a fifth time with a new general on January 25, 1863—Maj. Gen. Joseph Hooker, a man with a pugnacious reputation who had performed well in previous subordinate commands.
With Burnside's departure, Maj. Gen. William B. Franklin left as well. Franklin had been a staunch supporter of George B. McClellan and refused to serve under Hooker, because he disliked him personally and also because he was senior to Hooker in rank. Maj. Gen. Edwin V. Sumner stepped down due to old age (he was 65) and poor health. He was reassigned to a command in Missouri, but died before he could assume it. Brig. Gen. Daniel Butterfield was reassigned from command of the V Corps to be Hooker's chief of staff.
Hooker embarked on a much-needed reorganization of the army, doing away with Burnside's grand division system, which had proved unwieldy; he also no longer had sufficient senior officers on hand that he could trust to command multi-corps operations. He organized the cavalry into a separate corps under the command of Brig. Gen. George Stoneman (who had commanded the III Corps at Fredericksburg). But while he concentrated the cavalry into a single organization, he dispersed his artillery battalions to the control of the infantry division commanders, removing the coordinating influence of the army's artillery chief, Brig. Gen. Henry J. Hunt.
Hooker established a reputation as an outstanding administrator and restored the morale of his soldiers, which had plummeted to a new low under Burnside. Among his changes were fixes to the daily diet of the troops, camp sanitary changes, improvements and accountability of the quartermaster system, addition of and monitoring of company cooks, several hospital reforms, an improved furlough system, orders to stem rising desertion, improved drills, and stronger officer training.

Intelligence and plans: Hooker took advantage of improved military intelligence about the positioning and capabilities of the opposing army, superior to that available to his predecessors in army command. His chief of staff, Butterfield, commissioned Col. George H. Sharpe from the 120th New York Infantry to organize a new Bureau of Military Information in the Army of the Potomac, part of the provost marshal function under Brig. Gen. Marsena R. Patrick. Previously, intelligence gatherers, such as Allan Pinkerton and his detective agency, gathered information only by interrogating prisoners, deserters, "contrabands" (slaves), and refugees.
The new BMI added other sources including infantry and cavalry reconnaissance, spies, scouts, signal stations, and an aerial balloon corps. As he received the more complete information correlated from these additional sources, Hooker realized that if he were to avoid the bloodbath of direct frontal attacks, which were features of the battles of Antietam and, more recently, Fredericksburg, he could not succeed in his crossing of the Rappahannock "except by stratagem."

Hooker's army faced Lee across the Rappahannock from its winter quarters in Falmouth and around Fredericksburg. Hooker developed a strategy that was, on paper, superior to those of his predecessors. He planned to send his 10,000 cavalrymen under Maj. Gen. George Stoneman to cross the Rappahannock far upstream and raid deep into the Confederate rear areas, destroying crucial supply depots along the railroad from the Confederate capital in Richmond to Fredericksburg, which would cut Lee's lines of communication and supply.
Hooker reasoned that Lee would react to this threat by abandoning his fortified positions on the Rappahannock and withdrawing toward his capital. At that time, Hooker's infantry would cross the Rappahannock in pursuit, attacking Lee when he was moving and vulnerable. Stoneman attempted to execute this turning movement on April 13, but heavy rains made the river crossing site at Sulphur Spring impassable. President Lincoln lamented, "I greatly fear it is another failure already." Hooker was forced to create a new plan for a meeting with Lincoln, Secretary of War Edwin M. Stanton, and general in chief Henry W. Halleck in Aquia on April 19.

Hooker's second plan was to launch both his cavalry and infantry simultaneously in a bold double envelopment of Lee's army. Stoneman's cavalry would make a second attempt at its deep strategic raid, but at the same time, 42,000 men in three corps (V, XI, XII Corps) would stealthily march to cross the Rappahannock upriver at Kelly's Ford. They would then proceed south and cross the Rapidan at Germanna and Ely's Ford, concentrate at the Chancellorsville crossroads, and attack Lee's army from the west.
While they were under way, 10,000 men in two divisions from the II Corps would cross at the U.S. Ford and join with the V Corps in pushing the Confederates away from the river. The second half of the double envelopment was to come from the east: 40,000 men in two corps (I and VI Corps, under the overall command of John Sedgwick) would cross the Rappahannock below Fredericksburg and threaten to attack Stonewall Jackson's position on the Confederate right flank.
The remaining 25,000 men (III Corps and one division of the II Corps) would remain visible in their camps at Falmouth to divert Confederate attention from the turning movement. Hooker anticipated that Lee would either be forced to retreat, in which case he would be vigorously pursued, or he would be forced to attack the Union Army on unfavorable terrain.
One of the defining characteristics of the battlefield was a dense woodland south of the Rapidan known locally as the "Wilderness of Spotsylvania". The area had once been an open broadleaf forest, but during colonial times the trees were gradually cut down to make charcoal for local pig iron furnaces. When the supply of wood was exhausted, the furnaces were abandoned and secondary forest growth developed, creating a dense mass of brambles, thickets, vines, and low-lying vegetation.
Catharine Furnace, abandoned in the 1840s, had recently been reactivated to produce iron for the Confederate war effort. This area was largely unsuitable for the deployment of artillery and the control of large infantry formations, which would nullify some of the Union advantage in military power. It was important for Hooker's plan that his men move quickly out of this area and attack Lee in the open ground to the east. There were three primary roads available for this west-to-east movement: the Orange Plank Road, the Orange Turnpike, and the River Road.
The Confederate dispositions were as follows: the Rappahannock line at Fredericksburg was occupied by Longstreet's First Corps division of Lafayette McLaws on Marye's Heights, with Jackson's entire Second Corps to their right.