Franklin Roosevelt was president when World War II began and remained president until his death in April of 1945, at which time Harry Truman took over. Truman was president for almost the last five months of the war.
Roosevelt had been elected president for his first term in 1936. World War II began in 1939, and the United States joined the war in 1941 after the bombing of Pearl Harbor. By this time, President Roosevelt was already in his second term. As Commander-in-Chief of the United States military, he was a powerful leader among the Allied Forces. The war did not last long after President Truman took office, but he ordered the bombs dropped on Japan in the summer of 1945 and also had to deal with all of the political decisions regarding the end of the war.