The story of how the Panama Canal came to be starts before Theodore Roosevelt. Construction on the canal began during Roosevelt’s time in office, but interest in a canal began long before Roosevelt (and the actual completion of the canal did not occur until he was out of office).
American leaders had wanted a canal across Central America for a long time before Theodore Roosevelt became president. They had wanted a quick way to get ships from the Atlantic coast of the US to the Pacific. The utility of such a canal became even clearer during the Spanish-American War. During that war, American warships had to go all the way around the tip of South America to get from the Pacific to help with the attack on Cuba. This made it very clear that a canal would be very beneficial during a war.
In 1901, the US and Britain agreed that the US would be allowed to control a canal cut through Central America. The canal could either be in Nicaragua or Panama. The Congress approved a canal through Panama. At that time, Panama was a part of Colombia and Colombia rejected the US request to be allowed to build the canal. In order to get around Colombian opposition, the US gave military help to separatist rebels in Panama. They gave money to the rebels and used a naval blockade to prevent Colombian troops from reaching Panama by sea to put the rebellion down.
Panama gained independence in this way in 1903. The US then made a treaty with Panama that allowed it to build the canal. With approval secured, the US began work on the canal in 1904. Work was completed and the canal was first used in 1914.
Thus, the US started to build the Panama Canal under President Theodore Roosevelt. However, interest in the canal had begun before he was in office and the canal was not actually completed until after he was no longer president.