A photo on the company's online website of a black boy wearing a green hoodie with the inscription “coolest monkey in the jungle” caused outrage among observers.
“Whose idea was it at @hm to have this little sweet black boy wear a jumper that says 'coolest monkey in the jungle'?” style blogger Stephanie Yeboah tweeted on Sunday.
“You do know that monkey is a known racial slur to black people right?” she added.
“The image has now been removed from all H&M channels and we apologise to anyone this may have offended,” the company told AFP.
A generic photo of the hooded sweatshirt without the modelling child is still available online.
H&M is not the only major company to be hit by an advertisement scandal in recent years.
Spanish clothing brand Zara in 2014 removed a striped pyjamas with a yellow star after facing outrage over its resemblance to clothes worn by Jewish prisoners in concentration camps.
And in October last year, personal care brand Dove apologised after it was accused of racism for airing a commercial showing a black woman turning into a white woman after removing her top.