He was born on a farm in Hancock County, Ohio, the son of Robert Wilson and Harriet Welsh Campbell. After a few years of local schooling he entered in 1882 the University of Michigan to study civil engineering, graduating Bachelor of Science in 1886. Whilst at university he developed his interest in astronomy when he read Simon Newcomb's Popular Astronomy.
After graduating he was appointed Professor of Mathematics at the University of Colorado but soon moved back to Michigan as an instructor in astronomy. In 1891 he was invited to work on spectroscopy at Lick Observatory in California. Campbell was a pioneer of astronomical spectroscopy and catalogued the radial velocities of stars. He was also recognized for his work in solar eclipse photography. In 1893 he discovered the Wolf-Rayet star HD 184738 (also known as Campbell's hydrogen envelope star). He was made a director of Lick Observatory from 1901 to 1930.
In August 1914, Campbell and Erwin Freundlich of the Berlin Observatory were in Russia to photograph a solar eclipse, in an early attempt to test the validity of Albert Einstein's general theory of relativity. The outbreak of World War I (and in particular Germany's declaration of war against Russia) led to the seizure of Freundlich and his equipment in the Crimea by Russian officers. Campbell, from neutral America, was permitted to continue with his plans, but cloud cover obscured the eclipse. Campbell undertook another attempt to photograph a solar eclipse on June 8, 1918, in Goldendale, in Washington state. But his precision photographic equipment had been retained in Russia four years earlier, and he had to improvise the needed apparatus from existing equipment at the Lick Observatory. The cameras he used were not able to confirm the deflection of star light predicted by Einstein's theory.
Confirmation of Einstein's theory came in 1919 in the wake of an expedition led by Arthur Eddington to photograph the eclipse of May 29, 1919. But some uncertainty remained, as well as scepticism fueled in part by anti-German sentiment in the wake of World War I. Final and uncontested confirmation is generally dated to Campbell's 1922 Lick Observatory expedition to Australia to photograph the solar eclipse. Campbell's report of the results state that the observations "furnish a value ... which agrees exactly with Einstein's prediction."
He served as 10th President of the University of California from 1923 to 1930. He also served on the board of trustees for Science Service, now known as Society for Science & the Public, from 1923 to 1926. He served three terms as president of the Astronomical Society of the Pacific (in 1895, 1909 and 1918).
He committed suicide in California at the age of 76 by leaping to his death from a fourth-story window in San Francisco. He was mostly blind and suffering from bouts of aphasia. This was not only very frustrating to him, but he felt that it left him a burden to his family in terms of care and expense, according to notes he left behind at the time of his death. He married Elizabeth Ballard Thompson in 1892; they had three sons (one of them was WWI ace Douglas Campbell).