Johnson was selected to be Lincoln's vice president because Lincoln was trying to run on a unity ticket that would be inclusive of southerners. Johnson was the only sitting senator from a state that seceded (Tennessee) who did not surrender his seat in the United States Senate and who remained firmly in favor of the Union.
As President, however, Johnson favored policies adopted by the southern states that restricted the freedom of former slaves, and he came into conflict with the Republican-controlled Congress. The Congress would pass legislation overrriding actions of the former confederate states, then Johnson would veto that legislation, only to have Congress override the veto. Eventually, Johnson was impeached by the House and acquitted by one vote in the Senate.