Brian Wilson may have achieved worldwide acclaim and commercial success as the musical genius behind The Beach Boys, but apparently Fred Morgan wasn’t all that impressed.

Morgan was the Hawthorne High School music teacher who famously gave Wilson an F for “Surfin’ USA,” which went on to be one of the Beach Boys’ biggest hits in the 1960s. Hoping to right that wrong, his alma mater invited him back this week to make a slight adjustment in Wilson’s grade.

“Brian wrote a composition for me and it turned out to be ‘Surfin’,” said Morgan, according to Wilson’s posts on social media. “That composition got an F, but it made a million dollars.”

The 75-year-old legend, who changed American pop culture with “Surfin’ USA” and countless other hits, visited the school Sunday and left with an A for penning the song.

Principal Vanessa Landesfeind made the symbolic course correction and presented Wilson with a certificate changing that F to an A.

“It’s Beach Boys’ legend that he was failed on this one assignment,” Landesfeind said. “He was a good student and an athlete. He never failed a class. It was our opportunity to say: ‘You’re awesome, we’re honored to have you at the school.’ ”

Wilson was filmed during his visit by a crew producing a documentary about him. He visited Landesfeind’s office and the school’s baseball field.

“He was quiet and didn’t say much,” she said. “But he was very nice. We drove him on a golf cart to the baseball field. He was a major athlete.”

The crew went on to make stops at places along Hawthorne Boulevard that were popular during Wilson’s teenage years. The boulevard used to be an active cruising strip for young people.

“Surfin’ USA” was released on an album of the same name in 1963 and spent 25 weeks on the Billboard Hot 100 Chart, peaking at third place. Chuck Berry received writing credit and publishing royalties for the hit because it was based on his 1958 hit “Sweet Little Sixteen.”

Brothers Brian, Dennis and Carl Wilson perfected their signature vocal harmonies in the family’s Hawthorne home with family friend Al Jardine and cousin Mike Love.

The city of Hawthorne, proud of its connection to one of the biggest pop bands of all time, erected a shrine to the band in 2011 at the site where the Wilsons lived, at 3701 W. 119th St.