President Theodore Roosevelt appointed Landis as a judge of the United States District Court for the Northern District of Illinois in 1905. Landis received national attention in 1907 when he fined Standard Oil of Indiana more than $29 million (approximately $800 million in 2021) for violating federal laws forbidding rebates on railroad freight tariffs. Though Landis was reversed on appeal, he was seen as a judge determined to rein in big business. During and after World War I, Landis presided over several high-profile trials of draft resisters and others whom he saw as opposing the war effort. He imposed heavy sentences on those who were convicted; some of the convictions were reversed on appeal, and other sentences were commuted.