In February 1865, Union armies commanded by William T. Sherman were advancing northward through the Carolinas towards Virginia. They were opposed by troops from the Department of South Carolina, Georgia, and Florida, commanded by William J. Hardee, and cavalry commanded by Wade Hampton; both were under General P. G. T. Beauregard, commander of the Confederate Military Division of the West. However, both Confederate President Jefferson Davis and general-in-chief Robert E. Lee questioned Beauregard's ability to handle the situation in the Carolinas, so on February 23 Lee appointed General Joseph E. Johnston to command the Confederate forces in the Carolinas. Johnston established his headquarters at Smithfield, North Carolina and named his force the "Army of the South". It consisted of four separate field forces present in North Carolina:
The Army of Tennessee, temporarily commanded by Lieutenant General Alexander P. Stewart, divided into three corps temporarily commanded by William B. Bate, Daniel H. Hill, and William W. Loring. The army was then in the process of being transferred from Mississippi by rail and only 4,500 men had arrived by February. Two of the permanent corps commanders, Benjamin F. Cheatham and Stephen D. Lee, were absent.
The Department of South Carolina, Georgia, and Florida, commanded by Lieutenant General William J. Hardee, with the divisions of Lafayette McLaws and William B. Taliaferro. Hardee formerly had Ambrose R. Wright's division of Georgia militia, but that division had been recalled back to Georgia on February 23.
The Department of North Carolina, commanded by General Braxton Bragg. He had with him only the division of Robert F. Hoke, with several coastal artillery units attached.
The cavalry command of Lieutenant General Wade Hampton, with Matthew C. Butler's division and Joseph Wheeler's corps.
Johnston had a total of less than 25,000 men, with at least 1,300 men without rifles and with a shortage of artillery and wagons. Johnston initially hoped to concentrate his forces at Fayetesville, North Carolina and attack part of Sherman's forces while it was crossing the Cape Fear River. But Sherman moved more rapidly than Johnston anticipated and another Union force was advancing from Wilmington to Goldsboro, which was on Johnston's flank. Johnston decided that remaining at Fayetesville was too risky, so he retreated back to Smithfield to concentrate his army. Meanwhile, he continued to look for an opportunity to attack an isolated portion of the Union force, hoping to overwhelm that part before the rest of Sherman's force could reach it. On March 18, Hampton and Wheeler reported that the two wings of Sherman's force were separated by twelve miles and a day's march from each other. Johnston decided to take advantage of the distance between the Union wings and attack Henry W. Slocum's wing near Bentonville. According to his plans, Hampton's cavalry would slow down the Union advance while the Confederate infantry deployed behind them; he believed that if he could defeat Slocum's wing and destroy the Union wagon train with it, he might have a chance to defeat the remainder of the Union army. The Confederate infantry arrived at Bentonville on the 19th, with Bragg's force deployed on the left and Stewart's Army of the Tennessee on the right; due to inaccurate maps, Hardee failed to arrive until late morning and so was used as a reserve force. The attack hit the Union XIV Corps and routed the two divisions on the Union left; James D. Morgan's division on the right held its ground against multiple Confederate attacks. The Union units rallied near the Harper House and, reinforced by the XX Corps, managed to hold against additional Confederate charges. Sherman's other wing arrived during the night and formed on the right of Slocum's wing; Johnston refused his left to protect his line of retreat. He remained at Bentonville for two days, hoping that Sherman would make another costly assault like at the Battle of Kennessaw Mountain, but Sherman failed to do so. During the night of March 21, Johnston retreated back to Smithfield and waited there for Sherman's next move. Meanwhile, he attempted to obtain arms and rations for his men. Morale among the men started dropping in early April due to news of Confederate defeats and surrenders elsewhere and desertions began to become a problem, but Johnston still had about 28,000 men present for duty in late March, which increased to 30,000 by April 7. From April 8 to the 10th, Johnston reorganized the army, consolidating dozens of shrunken regiments and brigades, and forming the resulting divisions into three corps commanded by Hardee, Stewart, and Lee. Several commanders were relieved of command, including Bragg, McLaws, and Taliaferro. The reorganized force was named the Army of Tennessee.