William S. Ervin (September 4, 1886 – April 2, 1951) was an American attorney and politician from Minnesota. A member of the Minnesota Farmer–Labor Party, he is most notable for his service as Attorney General of Minnesota from 1936 to 1939.
William Sterling Ervin was born in Birmingham, Iowa on September 4, 1886. He was the son of Robert Milton Ervin and Malzena (Cole) Ervin, and his family moved to Minnesota when he was six months old. Ervin graduated from high school in Mankato, Minnesota. He then attended the University of Minnesota Law School, from which he graduated with an LL.B. degree in 1910.
Ervin attained admission to the bar in 1910 and practiced in Sandstone, Minnesota. A member of the Minnesota Farmer–Labor Party, he served as county attorney of Pine County from 1914 to 1918. In 1919, he moved to Minneapolis. From 1933 to 1936, Ervin served as Assistant Attorney General of Minnesota. In 1936, he was appointed Attorney General when Harry H. Peterson resigned to accept appointment to the Minnesota Supreme Court, and he served until 1939. He was an unsuccessful candidate for election to the position in 1938.
After leaving the attorney general's office, Ervin resumed the practice of law. During World War II, he was a United States Commissioner authorized to perform certain judicial functions of Minnesota's federal district court. From 1943 to 1947 he served as assistant commissioner of the land office for Hennepin County, and he served as commissioner from 1947 to 1949.
After leaving the land commissioner's office, Ervin continued to practice law and reside in Minneapolis. He died in Minneapolis on April 2, 1951, after suffering a heart attack while walking on a street near his home. He was buried at Lakewood Cemetery in Minneapolis.
In 1914, Ervin married Elsie L. Orth. He was survived by his wife, daughter Betty, and son Robert.