LOS ANGELES, Aug. 4— James Jamerson, whose electric bass backed many of Detroit's biggest musical stars, died Tuesday, his wife said today. He was 45 years old.

A coroner's spokesman attributed Mr. Jamerson's death, at the University of Southern California Medical Center at Los Angeles County General Hospital, to natural causes.

Mr. Jamerson, who was born in South Carolina, worked most of his life in Detroit. From the late 1950's to the early 1970's he played for such Motown stars as Smokey Robinson, Marvin Gaye, Stevie Wonder, the Supremes, the Temptations, the Four Tops and Gladys Knight and the Pips. In the 1970's, he also accompanied Bobby Darin, Tom Jones, Brian Wilson, Joan Baez and the Jazz Crusaders.

In addition to his wife, Mr. Jamerson is survived by four children.