In 1863 he served with the Union Army in the 187th Regiment Indiana Volunteers during the American Civil War. Wiley graduated from Hanover College in 1867 and later became the first chemistry teacher at Purdue University in 1874. He also obtained additional degrees from Indiana Medical College and Harvard (MA).
Appointed Chief Chemist of the U.S. Dept. of Agriculture in 1885. Instrumental in driving the effort which culminated in the passage of the Pure Food and Drug Act of 1906 (FDA). Wiley led this agency until his resignation in 1912.