BOSTON — The game-winning goal that Joel Ward of the Washington Capitals scored against the Boston Bruins in overtime on Wednesday did two things, both embarrassing to Boston. It knocked the reigning champion Bruins out of the N.H.L. playoffs, and it unleashed a flurry of Twitter slurs against Mr. Ward that summoned an old, familiar image of this city as a den of racist white sports fans.

Mr. Ward is one of a small number of black players in the league. The posts, seemingly from resentful Bruins fans, characterized him using expletives, words like “dumb” and “stupid,” and a common racial epithet. On Thursday, Mr. Ward brushed off the posts, telling USA Today, “It doesn’t faze me at all.” But for many here, the comments dredged up a past they would rather forget.

The Red Sox were the last major league team to integrate their roster, and refused the chance to acquire Willie Mays in 1949. The Celtics legend Bill Russell called Boston “a flea market of racism” after vandals broke into his home and left slurs on the walls in the 1960s.

Sports aside, the city’s resistance to school integration four decades ago marked it as a racially polarized place. It is a reputation that, fair or not, has yet to entirely fade.