Rod Temperton and his wife, Kathy, in 2012. (Yui Mok/AP)

Rod Temperton, a prolific English songwriter and self-taught musician who penned the disco-defining “Boogie Nights,” the soul standard “Always and Forever” and the Michael Jackson smash “Thriller,” has died in London. He was reportedly 66, but other sources put his age at 73.

His music publisher, Warner/Chappell, said in a statement on Oct. 5 that Mr. Temperton had died last week of an “aggressive” cancer. No other details were provided.

The antithesis of a household name — he was rarely seen in public and was rarely photographed — Mr. Temperton nevertheless was responsible for some of the most indelible rock and pop hits of the 1970s and 1980s. His music sold tens of millions of copies.

The London Guardian newspaper once described Mr. Temperton as a “reclusive, Grammy-winning genius who has always shunned the spotlight.” Jon Platt of Warner/Chappell said Mr. Temperton was sometimes known as “the invisible man” for his behind-the-scenes role in crafting major songs.

Rodney Lynn Temperton was born in Cleethorpes, England. Various years of birth have been given from 1943 to 1949. He once told BBC Radio that his earliest exposure to music came from his father, who “wasn’t the kind of person who’d read you a story before you went off to sleep. He used to put a transistor radio in the crib, right on the pillow, and I’d go to sleep listening to Radio Luxembourg and I think that had an influence.”

As a musician, he played drums before switching to keyboard. He was working in a frozen fish factory when he responded in the mid-1970s to an advertisement in a music trade publication to join Heatwave, an international group that featured American-born Johnnie Wilder Jr. as lead singer.

Mr. Temperton wrote two of Heatwave’s most infectious hits, “Boogie Nights” and the ballad “Always and Forever,” both of which appeared on the band’s 1976 album “Too Hot to Handle.” Both songs raced to the top of the charts.

“Boogie Nights,” in particular, so defined the disco era that filmmaker Paul Thomas Anderson adopted the title for his 1997 film about the porn industry set in that time. “Always and Forever” also attracted wide attention and was later covered by Luther Vandross, among others.

For Heatwave, Mr. Temperton also penned such memorable songs as “Baby, Come to Me” and “The Groove Line.” Widely admired by peers, he left the band and continued his prolific songwriting career for other groups, among them the funk band Rufus and the funk and R&B outfit the Brothers Johnson.

His most enduring creative partnership was with producer Quincy Jones and Jackson, for whom Mr. Temperton wrote “Rock With You” and “Off the Wall” for the singer’s 1979 LP “Off the Wall.” Mr. Temperton later triumphed with the title track to Jackson’s 1982 album “Thriller,” contributing as well others songs such as “Baby Be Mine” and “The Lady in My Life.”

In a 2009 interview with the London Daily Telegraph, Mr. Temperton said “Thriller” was originally called “Starlight” until Jones asked him to find a new title.

“I went back to the hotel, wrote two or three hundred titles and came up with ‘Midnight Man,’ ” he recalled. “The next morning I woke up and I just said this word (thriller). Something in my head just said, ‘This is the title.’ You could visualize it at the top of the Billboard charts. You could see the merchandising for this one word, how it jumped off the page as ‘Thriller.’ ”

Numerous other artists would have hits with his work, including George Benson with “Give Me the Night” and Donna Summer with “Love Is in Control (Finger on the Trigger).”

Mr. Temperton also received an Oscar nomination as a co-writer of “Miss Celie’s Blues (Sister),” from the soundtrack of “The Color Purple” (1985), and contributed several songs to the Billy Crystal-Gregory Hines comedy “Running Scared” (1986).

With Jones and others, he shared a 1990 Grammy for best arrangement on an instrumental for the jazz standard “Birdland,” featured on Jones’s album “Back on the Block.”

A list of survivors could not immediately be confirmed. The Guardian reported in 2009 that Mr. Temperton was rumored to own homes in many exclusive enclaves around the world. But on the few occasions he consented to interviews, he presented himself as a man of simple pleasures.

“I watch telly, catch up on the news, and maybe the phone will ring,” he said.