Within weeks of Wilson's victory over Hughes, the problem of the Great War became even more pressing. Although the Entente powers were now slightly more willing to discuss President Wilson's offer to arbitrate the dispute, the Central powers, led by Germany, were not willing to negotiate. In fact, Germany increased its war effort in February 1917 when it announced that German U-boats would attack every ship in the waters around Europe, regardless of purpose, nationality, or destination. In response, Wilson ended diplomatic relations with Germany several days after the announcement. His goal was not to fight, but rather to inform the German emperor in the sternest way possible short of war that Germany's actions were unacceptable and risked a confrontation. Germany ignored the threat. At this point, many in the United States began clamoring for war.
Wilson and the public were even more outraged when American intelligence services intercepted a secret communiqué to Mexico from German Foreign Secretary Arthur Zimmerman, which requested that Mexico declare war on the U.S. if the U.S. declared war on Germany. The communiqué, known as the Zimmerman Note, promised Mexico the area of Texas, Arizona, and New Mexico at the end of the war if Mexico invaded the U.S. Finally, on March 18, 1917, German U-boats sank three American merchant ships without warning. The next day, President Wilson decided to enter the war alongside the Allied forces.
On April 2, 1917, Wilson requested that Congress declare war on Germany, stating that the "The world must be made safe for democracy." Congress declared war on April 6, and Wilson signed the war declaration on April 7. Wilson wanted to make it clear, however, that the U.S. was not fighting as an Allied power, but merely as, what he called, an associate power. The difference rested in each power's war aims: whereas the Entente Allies clearly wanted war spoils such as land, money, and the subjugation of the German people, Wilson declared that the United States was fighting only for moral reasons, namely to protect democracy from tyranny and promote peace throughout the world. After the war's end, Wilson also wanted to establish a council that would ensure the collective security of all of Europe. Wilson first prepared the military. Although the U.S. Navy was prepared to fight under the leadership of Secretary of the Navy Josephus Daniels and Assistant Secretary of the Navy Franklin Delano Roosevelt, the U.S. Army needed bolstering. In May 1917, Congress enacted a Selective Service bill at Wilson's urging, with the purpose of drafting young men into the armed forces. During the course of the war, nearly 3,000,000 men were drafted to bring the total size of the military to 4,800,000. Wilson expected the public to despise the draft, but he was pleasantly surprised to learn that many supported it, especially in the North. Wilson appointed General John J. Pershing as commander of U.S. forces in Europe, and sent him to France to assist the Allied troops. Reportedly, Pershing had only two orders from the President, the first being to go to France to fight and the second being to return home. Wilson left the business of tactics and fighting completely under Pershing's jurisdiction. By war's end, 1,200,000 American troops were stationed in France; also by that time, 112,000 American servicemen had died.
Wilson also tackled the task of organizing and coordinating production of American war materials and foodstuffs. He appointed future U.S. President Herbert Hoover to direct a Food Administration to increase U.S. agricultural production and reduce consumption. Hoover proved amazingly adept at the task; by war's end, he had more than tripled agricultural production in the country. Wilson then appointed Harry A. Garfield to run the Fuel Administration to increase domestic fuel production. The President also placed his son-in-law, Secretary of the Treasury William G. McAdoo, as the head of the new Railroad Administration to optimize transportation.
Many businessmen and Republicans denounced Wilson as a socialist for these programs and attempted to regain control of production plans to take over the American war effort. Wilson fought back with political violence. To ensure his future leadership, Wilson drafted the Overman Act in March 1918 and pushed it through Congress. The act gave Wilson unprecedented control over the war effort, from governmental powers down to production powers. After Congress passed the act, Wilson was not only the nation's military commander-in-chief, but also its chief in nearly every other aspect of the war.
As had many Presidents before him in times of war–including the esteemed Abraham Lincoln–Wilson believed that antiwar sentiment would only disrupt or potentially damage the war effort. In 1917, he signed Congress's Espionage Act, which outlawed draft dodging and gave the federal government the power to censor printed material, including mail. A year later, with Wilson's approval, Congress passed the Sedition Act of 1918 to prohibit citizens from speaking out against the federal government or its political leadership. The government prosecuted many under these two laws. The most famous dissenter was Eugene V. Debs, former Socialist Party candidate for President in 1912, who was handed a ten-year prison sentence for opposing the government's decision to enter the war.