Namby-pamby was a real person's nickname, and it was meant to hurt. The man was the poet Ambrose Philips, and his rivals turned his first name into baby talk.

Philips, who lived from 1674 to 1749, had a comfortable position. Phrase Finder says that in 1714 he became tutor to the grandchildren of George I. He wrote short, sentimental poems in praise of aristocratic children. Wikipedia describes his odes as dedicated to "all ages and characters, from Walpole steerer of the realm, to Miss Pulteney in the nursery."

Other writers found them unbearable. Phrase Finder quotes the line "Fairest offspring of the fair" from his 1725 poem to Miss Carteret. The verses used short, choppy seven-syllable lines, which Wikipedia calls a "new prosody."

Henry Carey struck first in print. His poem was titled Namby Pamby: or, a panegyrick on the new versification, addressed to "A----- P----." Wikipedia and World Wide Words date it to 1725, while Merriam-Webster gives 1726. It mimicked Philips's choppy lines and nursery tone. World Wide Words says Carey built the name on Philips's given name. The second half, "Pamby," is a rhyming echo, the way children double words.

Politics sharpened the attack. Philips was a Whig favourite, and Wikipedia notes the Tory satirists' scorn was partly political. Alexander Pope took up Carey's name in The Dunciad. Jonathan Swift and John Gay used it too. In 1745 William Ayre quoted Swift on "the Namby Pamby Stile."

The insult soon outgrew its target. Phrase Finder traces the shift from Philips himself, to a style of feeble writing, to anything weak. By 1774 the Westmoreland Magazine could call someone "A namby-pamby Duke." Merriam-Webster's modern definitions are "lacking in character or substance" and weak or indecisive.

Samuel Johnson later wrote that Philips "became ridiculous, without his own fault," blaming the excessive praise of his friends. It did not help. World Wide Words calls Philips virtually unknown today, remembered mainly through the word that mocked him.