stylistic:style_transfer
Shiloh (1862) and aftermath

Reinstated by Halleck at the urging of Lincoln and Secretary of War Edwin Stanton, Grant rejoined his army with orders to advance with the Army of the Tennessee into Tennessee. His main army was located at Pittsburg Landing, while 40,000 Confederate troops converged at Corinth, Mississippi. Grant wanted to attack the Confederates at Corinth, but Halleck ordered him not to attack until Major General Don Carlos Buell arrived with his division of 25,000. Grant prepared for an attack on the Confederate army of roughly equal strength. Instead of preparing defensive fortifications, they spent most of their time drilling the largely inexperienced troops while Sherman dismissed reports of nearby Confederates.

On the morning of April 6, 1862, Grant's troops were taken by surprise when the Confederates, led by Generals Albert Sidney Johnston and P. G. T. Beauregard, struck first "like an Alpine avalanche" near Shiloh church, attacking five divisions of Grant's army and forcing a confused retreat toward the Tennessee River. Johnston was killed and command fell upon Beauregard. One Union line held the Confederate attack off for several hours, giving Grant time to assemble artillery and 20,000 troops near Pittsburg Landing. The Confederates finally broke and captured a Union division, but Grant's newly assembled line held the landing, while the exhausted Confederates, lacking reinforcements, halted their advance.

Bolstered by 18,000 troops from the divisions of Major Generals Buell and Lew Wallace, Grant counterattacked at dawn the next day and regained the field, forcing the disorganized and demoralized rebels to retreat to Corinth. Halleck ordered Grant not to advance more than one day's march from Pittsburg Landing, stopping the pursuit. Although Grant had won the battle, the situation was little changed. Grant, now realizing that the South was determined to fight, would later write, "Then, indeed, I gave up all idea of saving the Union except by complete conquest."

Shiloh was the costliest battle in American history to that point and the staggering 23,746 casualties stunned the nation. Briefly hailed a hero for routing the Confederates, Grant was soon mired in controversy. The Northern press castigated Grant for shockingly high casualties, and accused him of drunkenness during the battle, contrary to the accounts of those with him at the time. Discouraged, Grant considered resigning but Sherman convinced him to stay. Lincoln dismissed Grant's critics, saying "I can't spare this man; he fights." Grant's costly victory at Shiloh ended any chance for the Confederates to prevail in the Mississippi valley or regain its strategic advantage in the West.

Halleck arrived from St. Louis on April 11, took command, and assembled a combined army of about 120,000 men. On April 29, he relieved Grant of field command and replaced him with Major General George Henry Thomas. Halleck slowly marched his army to take Corinth, entrenching each night. Meanwhile, Beauregard pretended to be reinforcing, sent "deserters" to the Union Army with that story, and moved his army out during the night, to Halleck's surprise when he finally arrived at Corinth on May 30.

Halleck divided his combined army and reinstated Grant as field commander on July 11. Later that year, on September 19, Grant's army defeated Confederates at the Battle of Iuka, then successfully defended Corinth, inflicting heavy casualties. On October 25, Grant assumed command of the District of the Tennessee. In November, after Lincoln's preliminary Emancipation Proclamation, Grant ordered units under his command to incorporate former slaves into the Union Army, giving them clothes, shelter, and wages for their services.