(French, maroufle). A muff or muffin is a poor thing of a creature, a “regular muff;” so that a ragamuffin is a sorry creature in rags.
“I have led my ragamuffins where they are peppered.” —
Source: Dictionary of Phrase and Fable, E. Cobham Brewer, 1894
More on Ragamuffin from Fact Monster: