Grant's army was hastening in pursuit of that of Lee's, Grant had sent General Sheridan to flank around Lee's army and get in his front, so if possible to cut off his chance of escape.
Lee had intended to concentrate his forces at Amelia Court House, but his whole army did not come up until the evening of the 5th, and on the discovery of his inadequate supplies he began the march anew toward Farmville, dividing his army so as to secure supplies from the country over which he passed. In the afternoon of April 6th Lee's army was overtaken by the Federals and a hard battle was fought at Sailor's Creek, in which General Richard Ewell, who was on the rear of Lee's army, was captured with his entire corps, numbering about 6,000 men.
Lee's main army reached Farmville on the night of the 6th of April, where they received their first rations within two days, and near which place a hard battle was fought, in which the Confederates, under General Mahone, gained a temporary victory.
The retreat was again renewed in the hope of breaking through the Federal lines, which were rapidly enveloping around them. During these marches the soldiers were so worn out from hunger, fatigue, and lack of sufficient clothing in the early spring weather, that there was much straggling from the army, and many had thrown their arms away until scarcely one-third of Lee's army was equipped for battle.
Lee's army reached Appomattox Court House late in the evening of April 8th, and here found the Federals in their front, and were compelled to stop and prepare for battle. General Lee and his officers held a council of war that night and decided to make a desperate effort to cut through the Federal lines the next morning. This task was assigned to General Gordon.
On Sunday, the 9th, Gordon made a fierce attack upon the Federals in his front, but was finally repulsed by overwhelming numbers, and sent word to General Lee that he could do nothing further unless he was heavily supported from Longstreet's corps.
With the repulse of Gordon on that morning sank Lee's last hope of breaking through the Federal lines, and he said there is nothing to do but see Grant.
Grant had proposed to Lee at Farmville, on the evening of the 7th, terms for the surrender of Lee's army, to which Lee replied that as much as he desired peace, yet the time certainly had not arrived for the surrender of the Army of Northern Virginia.
After the repulse of Gordon, on April 9th, Lee soon arranged a meeting with Grant and a truce was ordered pending negotiations for the surrender of Lee's army. This meeting took place at the house of Wilmer McLean at Appomattox Court House, at which place the terms were finally agreed upon by the two world famous commanders and were put in writing in the form of a letter from General Grant to General Lee, and the acceptance of the terms were written by Lee to Grant in the same form.
It is interesting to know that Wilmer McLean had lived on the battlefield of Bull Run during the progress of the first battle fought there, and after the battle moved to Appomattox Court House, and at his house was negotiated the terms of the surrender of Lee's army, thus around his premises was fought the first and the last great battle of the war.