Retired Marine Corps Col. William M. Miller, 62, who was commanding officer of the Marine Barracks in Washington in the 1950s and later was the historian of the Marine Corps, died of cancer Thursday at the Bethesda Naval Hospital.

He had been a trade executive with the American Petroleum Institute in Washington for the last 18 years. Before moving to McLean last year, Col. Miller lived in Arlington for about 20 years.

He was born in Big Island, Va. He grew up in Roxboro and Greensboro, N.C., attended the University of North Carolina at Chapel Hill for three years, and then entered the U.S. Naval Academy at Annapolis. He graduated in 1941, was commissioned in the Marine Corps, and served in the Pacific theater during World War II.

Col. Miller was commanding officer of the Marine Barracks in San Juan, Puerto Rico, and then commanded the Marine Barracks here. He was commanding officer of the 10th Marine Regiment on Okinawa before being named historian of the Marine Corps. He retired in 1961.

His decorations included the Bronze Star Medal.

He is survived by his wife, the former Lorraine Burns, of McLean; a daughter, Reverdy Howley of Richmond; his mother, Mary Violet Miller of Southern Pines, N.C., and two sisters, Mary Forbis of Charlotte, N.C., and Elaine Odenwald of Greensboro.