In 1905, Kellogg joined the federal government when Theodore Roosevelt asked Kellogg to prosecute a federal antitrust case. In 1906, Kellogg was appointed special counsel to the Interstate Commerce Commission for its investigation of E. H. Harriman. In 1908, he was appointed to lead the federal prosecution against Union Pacific Railroad, under the Sherman Antitrust Act. His most important case was "Standard Oil Co. of New Jersey v. United States", 221 U.S. 1 (1911). Following this successful prosecution, he was elected president of the American Bar Association (1912–1913).