Andrew Johnson became president upon Lincoln’s death (April 15, 1865) under the Presidential Succession Act of 1792, which placed the Vice President first in line, followed by the Senate President pro tempore and the Speaker of the House.
The 25th Amendment (1967) later clarified and formalized succession, including vice-presidential vacancy procedures. Johnson, as elected Vice President, automatically assumed the presidency without a special election.