James Cotton, center, with blues musicians B.B. King, left, and Muddy Waters performing in 1979. (Perez/Associated Press)

James Cotton, who learned to play the harmonica as a child in the Mississippi Delta and went on to be a major figure in blues music as a sideman to Muddy Waters and as a Grammy Award-winning solo performer, died March 16 at a hospital in Austin. He was 81.

His death was announced by his record label, Alligator Records. The cause was pneumonia.

Mr. Cotton grew up in the fabled Delta blues heartland of northern Mississippi and learned the harmonica from his mother before he became an orphan at 9. He began performing professionally soon thereafter and brought a showman’s flair to the classic blues tradition, sometimes doing back flips on stage.

A direct link to earlier generations of blues musicians, Mr. Cotton later appeared alongside dozens of acclaimed performers, from Janis Joplin and B.B. King to Led Zeppelin, Eric Clapton and Keith Richards.

Mr. Cotton wrote many tunes and sang in a gruff, guttural vocal style, but he was better known for his skill on the harmonica — or “harp,” as blues musicians often call it. Along with his mentor, Sonny Boy Williamson, and other artists such as Sonny Terry, Little Walter and Junior Wells, Mr. Cotton was recognized as one of the foremost masters of the blues harmonica.

James Cotton performing in 2005. (Jeff Christensen/Associated Press)

“Listen to Cotton’s harmonica playing,” Chicago Tribune critic Howard Reich wrote in 2013, “gritty, gutsy, ferociously uninhibited — and you’re hearing what great blues harp work is all about. No wonder they call him ‘Superharp.’ ”

Gripping a harmonica and microphone at the same time, Mr. Cotton practiced a technique called circular breathing, in which he inhaled through his nose while continuing to play long, energetic lines on his harmonica. His approach could be mournful, sweet or fleet, and he sometimes played so hard that the small metal-and-wood instrument fell apart in his hands.

In the early 1950s, Mr. Cotton recorded as a singer at Sun Records — the same Memphis recording studio where Elvis Presley launched his career. He then spent 12 years in Waters’s band and performed on the singer’s groundbreaking 1960 live album from the Newport Jazz Festival, which included a churning version of “Got My Mojo Working.” At one point in the song, Waters and Mr. Cotton playfully danced together.

Mr. Cotton formed the James Cotton Blues Band in 1966 and toured the world for years, performing his harp-focused version of Chicago-style blues, which also featured his rhythmic, unadorned singing. He released the first of more than 25 albums in 1967.

“Twenty-four hours a day, every day, you’ll catch me with a harmonica,” Mr. Cotton told the Los Angeles Times in 1990. “I sleep with ’em in the bed with me. I play for the truckers on the CB when we’re driving down the highway. The highway is my home, and my Dodge van is my bed, and the blues is my companion.”

James Henry Cotton was born July 1, 1935, in Tunica, Miss. His parents were sharecroppers.

He began playing the harmonica when he was about 5, learning to imitate the sounds of chickens and other farm animals from his mother.

James Cotton performing in 2014. (Darrin Phegley/Associated Press)

After both of his parents died, Mr. Cotton was introduced by a relative to Rice Miller, a blues musician and radio host better known as Sonny Boy Williamson. Mr. Cotton lived in his household for the next six years.

Asked what he learned from Williamson, Mr. Cotton replied, “How to chase women, how to drink and how to play the blues,” according to the Chicago Tribune. “Anything he played today, I learned it tomorrow.”

Despite his relative youth, Mr. Cotton learned a pure style of Delta blues that was fast disappearing. After Williamson moved to Milwaukee, the 15-year-old Mr. Cotton briefly took over his elder’s band and radio show.

While living near Memphis, Mr. Cotton drove an ice truck and spent two years in the band of another blues giant, Howlin’ Wolf. One of Mr. Cotton’s early vocal recordings for Sun Records, “Cotton Crop Blues,” became a minor rhythm-and-blues hit in 1954.

That year, Waters invited Mr. Cotton to move to Chicago and join his band. Mr. Cotton said he suggested that Waters perform “Got My Mojo Working,” which became one of his signature tunes.

As the blues revival reached its peak in the 1970s and 1980s, Mr. Cotton often appeared in concert or on records with younger rock-and-roll stars influenced by his music. Several of his albums from those years, including “100% Cotton” (1974), “High Compression” (1984) and “Live From Chicago: Mr. Superharp Himself” (1986), were ranked among his finest.

Reunited in a studio with Waters, Mr. Cotton appeared on the Grammy-winning album “Hard Again” in 1977. He received three Grammy nominations for his own work before winning in the best traditional blues category for his 1996 album, “Deep in the Blues,” which featured guitarist Joe Louis Walker and jazz bassist Charlie Haden.

Mr. Cotton’s voice became a raspy whisper after surgery for throat cancer in the 1990s, and he later abandoned singing altogether. His final album, the Grammy-nominated “Cotton Mouth Man,” was released in 2013. Other singers performed the autobiographical songs, but Mr. Cotton had lost none of his vigor on harmonica.

“Cotton is amazing on these cuts,” reviewer Steve Leggett wrote on the Allmusic.com website, “his harp blasts full of passion, power, and enough pure energy to light up the night sky.”

Mr. Cotton moved from Chicago to Memphis in the 1990s, after the death of his first wife, Ceola. He was inducted into the Blues Hall of Fame in Memphis in 2006 and settled in Austin in 2010.

Survivors include his second wife and manager, Jacklyn Hairston; three children; and numerous grandchildren and great-grandchildren.

“I’m not sure why my music still speaks so directly to folks,” Mr. Cotton told the Los Angeles Times in 1998. “I try to play from deep inside of me and keep the music honest. I prefer it upbeat and up-tempo too, because all the problems people have … are gone once we start playing.”