Did the members of the Confederate Army face persecution after the victory of the Union?
President Lincoln set an example of leniency early in the war, stating loudly and often that he did not want to persecute anyone, but simply to end the war as quickly as possible. On December 8, 1863, Lincoln issued a Proclamation of Amnesty and Reconstruction - the next year, he vetoed an attempt by Republican hardliners to enact a much harsher reconstruction bill.
General Ulysses S. Grant held to this strategy when he promised General Lee a blanket amnesty for his troops, and for any other Confederate troops that laid down arms. The brief interlude of relief for Confederate leaders ended with Lincoln's assassination. A federal grand jury in Norfolk, Virginia convened to deliberate on treason indictments. The Confederacy's president, Jefferson Davis was captured and held in shackles at a military base.
On May 29, 1865, President Johnson laid out a Proclamation of Amnesty and Reconstruction, recognizing a provisional government in Virginia and setting lenient terms for readmittance to the Union along the lines of Lincoln's earlier proposal. Lower-ranking Confederates and those without large estates could apply for a full pardon if they met the terms of the 1865 amnesty (which included a loyalty oath). Approving these pardons created a flood of paperwork, with the larger question of responsibility for the war and treason still unresolved. Despite this pardon, many Confederates still feared prosecution. Davis remained imprisoned (although his leg irons were removed), and the Norfolk grand jury returned indictments for treason against over a dozen Confederate officials and officers.
Johnson decided to cut the Gordian knot in order to assert his own power, threaten Congress, and streamline his administration's duties. On September 7, 1867, he granted a blanket pardon to all except about 300 of the Confederacy's highest officers. By this time, the threat of impeachment was hanging over his head - and after a failed impeachment vote in late 1867, he was impeached on February 24, 1868. It wasn't until the end of May that Johnson won a Pyrrhic victory, surviving impeachment but ending any working relationship with Congress.
With nothing left to lose, Johnson threw himself fully into courting Southern Democrats in order to save his political skin. On July 4, 1868, he extended the pardon to cover all except the few who had been indicted for treason - and on December 25, 1868, Johnson issued a full pardon to all Confederates. Text here. Johnson parlayed his fight on behalf of a lenient Reconstruction into a term as a Democratic Senator from Tennessee in 1875 (although he died shortly after returning to Washington).