1837, from French socialisme (1832) or formed in English (based on socialist) from social (adj.) + -ism. Perhaps first in reference to Robert Owen's communes. "Pierre Leroux (1797-1871), idealistic social reformer and Saint-Simonian publicist, expressly claims to be the originator of the word socialisme" [Klein, also see OED discussion]. The word begins to be used in French in the modern sense c. 1835.
I find that socialism is often misunderstood by its least intelligent supporters and opponents to mean simply unrestrained indulgence of our natural propensity to heave bricks at respectable persons. [George Bernard Shaw, "An Unsocial Socialist," 1900]