Battle of Chancellorsville
A Union party under flag of truce was allowed to approach ostensibly to collect the wounded, but while close to the stone wall, they were able to observe how sparsely the Confederate line was manned. A third Union attack was successful in overrunning the Confederate position. Early was able to organize an effective fighting retreat.
John Sedgwick's road to Chancellorsville was open, but he wasted time in gathering his troops and forming a marching column. His men, led by Brooks's division, followed by Newton and Howe, were delayed for several hours by successive actions against the Alabama brigade of Brig. Gen. Cadmus M. Wilcox. His final delaying line was a ridge at Salem church, where he was joined by three brigades from McLaws's division and one from Anderson's, bringing the total Confederate strength to about 10,000 men.
Artillery fire was exchanged by both sides in the afternoon and at 5:30 p.m., two brigades of Brooks's division attacked on both sides of the Plank Road. The advance south of the road reached as far as the churchyard, but was driven back. The attack north of the road could not break the Confederate line. Wilcox described the action as "a bloody repulse to the enemy, rendering entirely useless to him his little success of the morning at Fredericksburg." Hooker expressed his disappointment in Sedgwick: "my object in ordering General Sedgwick forward ... Was to relieve me from the position in which I found myself at Chancellorsville. ... In my judgment General Sedgwick did not obey the spirit of my order, and made no sufficient effort to obey it. ... When he did move it was not with sufficient confidence or ability on his part to manoeuvre his troops."
The fighting on May 3, 1863, was some of the most furious anywhere in the civil war. The loss of 21,357 men that day in the three battles, divided equally between the two armies, ranks the fighting only behind the Battle of Antietam as the bloodiest day of  war in American history.

May 4–6: Union withdrawals: On the evening of May 3 and all day May 4, Hooker remained in his defenses north of Chancellorsville. Lee observed that Hooker was threatening no offensive action, so felt comfortable ordering Anderson's division to join the battle against Sedgwick. He sent orders to Early and McLaws to cooperate in a joint attack, but the orders reached his subordinates after dark, so the attack was planned for May 4.
By this time Sedgwick had placed his divisions into a strong defensive position with its flanks anchored on the Rappahannock, three sides of a rectangle extending south of the Plank Road. Early's plan was to drive the Union troops off Marye's Heights and the other high ground west of Fredericksburg. Lee ordered McLaws to engage from the west "to prevent [the enemy] concentrating on General Early."
Early reoccupied Marye's Heights on the morning of May 4, cutting Sedgwick off from the town. However, McLaws was reluctant to take any action. Before noon, Lee arrived with Anderson's division, giving him a total of 21,000 men, slightly outnumbering Sedgwick. Despite Lee's presence, McLaws continued his passive role and Anderson's men took a few hours to get into position, a situation that frustrated and angered both Early and Lee, who had been planning on a concentrated assault from three directions.
The attack finally began around 6 p.m. Two of Early's brigades (under Brig. Gens. Harry T. Hays and Robert F. Hoke) pushed back Sedgwick's left-center across the Plank Road, but Anderson's effort was a slight one and McLaws once again contributed nothing. Throughout the day on May 4, Hooker provided no assistance or useful guidance to Sedgwick, and Sedgwick thought about little else than protecting his line of retreat.
Sedgwick withdrew across the Rappahannock at Banks's Ford during the pre-dawn hours of May 5. When he learned that Sedgwick had retreated back over the river, Hooker felt he was out of options to save the campaign. He called a council of war and asked his corps commanders to vote about whether to stay and fight or to withdraw. Although a majority voted to fight, Hooker had had enough, and on the night of May 5–6, he withdrew back across the river at U.S. Ford.

It was a difficult operation. Hooker and the artillery crossed first, followed by the infantry beginning at 6 a.m. on May 6. Meade's V Corps served as the rear guard. Rains caused the river to rise and threatened to break the pontoon bridges.
Couch was in command on the south bank after Hooker departed, but he was left with explicit orders not to continue the battle, which he had been tempted to do. The surprise withdrawal frustrated Lee's plan for one final attack against Chancellorsville. He had issued orders for his artillery to bombard the Union line in preparation for another assault, but by the time they were ready Hooker and his men were gone.
The Union cavalry under Brig. Gen. George Stoneman, after a week of ineffectual raiding in central and southern Virginia in which they failed to attack any of the objectives Hooker established, withdrew into Union lines east of Richmond—the peninsula north of the York River, across from Yorktown—on May 7, ending the campaign.

Aftermath: My God! It is horrible—horrible; and to think of it, 130,000 magnificent soldiers so cut to pieces by less than 60,000 half-starved ragamuffins!

Casualties: Lee, despite being outnumbered by a ratio of over two to one, won arguably his greatest victory of the war, sometimes described as his "perfect battle." But he paid a terrible price for it, taking more casualties than he had lost in any previous battle, including the stalemate at the Battle of Antietam. With only 60,000 men engaged, he suffered 13,303 casualties (1,665 killed, 9,081 wounded, 2,018 missing), losing some 22% of his force in the campaign—men that the Confederacy, with its limited manpower, could not replace. Just as seriously, he lost his most aggressive field commander, Stonewall Jackson. Brig. Gen. Elisha F. Paxton was the other Confederate general killed during the battle. After Longstreet rejoined the main army, he was highly critical of Lee's strategy, saying that battles like Chancellorsville cost the Confederacy more men than it could afford to lose.
Of the 133,000 Union men engaged, 17,197 were casualties (1,606 killed, 9,672 wounded, 5,919 missing), a percentage much lower than Lee's, particularly considering that it includes 4,000 men of the XI Corps who were captured on May 2. When comparing only the killed and wounded, there were almost no differences between the Confederate and Federal losses at Chancellorsville. The Union lost three generals in the campaign: Maj. Gens. Hiram G. Berry and Amiel W. Whipple and Brig. Gen. Edmund Kirby.

Assessment of Hooker: Hooker, who began the campaign believing he had "80 chances in 100 to be successful", lost the battle through miscommunication, the incompetence of some of his leading generals (most notably Howard and Stoneman, but also Sedgwick), but mostly through the collapse of his own confidence. Hooker's errors included abandoning his offensive push on May 1 and ordering Sickles to give up Hazel Grove and pull back on May 2. He also erred in his disposition of forces; despite Abraham Lincoln's exhortation, "this time put in all your men," some 40,000 men of the Army of the Potomac scarcely fired a shot. When later asked why he had ordered a halt to his advance on May 1, Hooker is reputed to have responded, "For the first time, I lost faith in Hooker." However, Stephen W. Sears has categorized this as a myth:

Nothing has been more damaging to General Joseph Hooker's military reputation than this, from John Bigelow's The Campaign of Chancellorsville (1910): "A couple of months later, when Hooker crossed the Rappahannock [actually, the Potomac] with the Army of the Potomac in the Campaign of Gettysburg he was asked by General Doubleday: 'Hooker, what was the matter with you at Chancellorsville? ... Hooker answered frankly ... 'Doubleday ... For once I lost confidence in Hooker'."
Sears's research has shown that Bigelow was quoting from a letter written in 1903 by an E. P. Halstead, who was on the staff of Doubleday's I Corps division. There is no evidence that Hooker and Doubleday ever met during the Gettysburg campaign, and they could not have done so since they were dozens of miles apart. Finally, Doubleday made no mention of such a confession from Hooker in his history of the Chancellorsville campaign, published in 1882.