Why was the Confederate president, Jefferson Davis, or any other Confederate soldier, not tried for high treason?
He was captured and held over for trial in 1865 but eventually was released when full amnesty was declared by Johnson in 1868. The wording of the amnesty proclamation gives Johnson's reasons and rationale for granting it:
Whereas the authority of the Federal Government having been reestablished in all the States and Territories within the jurisdiction of the United States, it is believed that such prudential reservations and exceptions as at the dates of said several proclamations were deemed necessary and proper may now be wisely and justly relinquished, and that an universal amnesty and pardon for participation in said rebellion extended to all who have borne any part therein will tend to secure permanent peace, order, and prosperity throughout the land, and to renew and fully restore confidence and fraternal feeling among the whole people, and their respect for and attachment to the National Government, designed by its patriotic founders for the general good:
Now, therefore, be it known that I, Andrew Johnson President of the United States, by virtue of the power and authority in me vested by the Constitution and in the name of the sovereign people of the United States, do hereby proclaim and declare unconditionally and without reservation, to all and to every person who, directly or indirectly, participated in the late insurrection or rebellion a full pardon and amnesty for the offense of treason against the United States or of adhering to their enemies during the late civil war, with restoration of all rights, privileges, and immunities under the Constitution and the laws which have been made in pursuance thereof.
-- Amnesty Proclamation of 1868 by President Johnson pardoning everyone in the south.
The soldiers and officers of all Confederate Armies were exempted from treason trials by the terms of Lee's surrender to Grant. They were allowed to go home unmolested as long as they ceased to make war on the US. All other CSA forces soon surrendered on the same terms and also were exempt from treason trials.
Government officials were not exempt, and could have been tried for treason or other crimes. The official in charge of Andersonville Prison camp was executed for his actions there, as War Crimes. Jefferson Davis was imprisoned for about 2 years, but was let go on bail even before Johnson's pardon. Davis wanted a trial, but the US government decided it wasn't worth the fuss.
Not tried for Treason, and the other answers already detail that. But Lee and Jefferson Davis were not covered by the President Johnson's General Amnesty. I remember in 1976, when President Jimmy Carter granted Lee, his citizenships back. I was school mates with a Lee descendant. We also shared our class with a Grant descendant, but unlike my friend Robbie E. Lee V, she did not use her descendants name. Robbie was a 4th grader who was called to the Whitehouse and got to witness President Jimmy Carter from Georgia signing the order granting Lee his citizenship back. My friend was interviewed on the local Washington DC TV station that evening. Jimmy Carter did the same for Jefferson Davis a few years later (1978). Both Lee and Davis died denied the rights of citizenship in the United States.
Restoration of Citizenship Rights to Jefferson F. Davis
Statement on Signing S. J. Res. 16 into Law.
October 17, 1978
In posthumously restoring the full rights of citizenship to Jefferson Davis, the Congress officially completes the long process of reconciliation that has reunited our people following the tragic conflict between the States. Earlier, he was specifically exempted form resolutions restoring the rights of other officials in the Confederacy. He had served the United States long and honorably as a soldier, Member of the U.S. House and Senate, and as Secretary of War. General Robert E. Lee's citizenship was restored in 1976. It is fitting that Jefferson Davis should no longer be singled out for punishment.
Our Nation needs to clear away the guilts and enmities and recriminations of the past, to finally set at rest the divisions that threatened to destroy our Nation and to discredit the principles on which it was founded. Our people need to turn their attention to the important tasks that still lie before us in establishing those principles for all people.
Source: American Presidency Project
Lee also had his primary residence confiscated by the Union for failing to pay his property taxes during the civil war. The amount Lee owed totaled $92.07, for the 1,100 acre river front plantation overlooking the nations Capital. It is today the home of Arlington National Cemetery. The federal government settled up with Lee's ancestors in the 1880 when a supreme court decision returned the property and 6000 union graves to the Lee family. Robert E. Lee died, ten years prior in Oct 1870.