Banksy bought the painting from a Housing Works charity shop in New York, before reworking it with a Nazi figure and donating it back to the charity.
The Bristol-based artist painted the work, which he titled "The banality of the banality of evil," as part of his month-long “artist’s residency” in New York in October.
The painting was auctioned yesterday on behalf of the Housing Works charity, which helps to fund Aids and homelessness projects.
After 138 bids, the painting sold for $615,000 (£383,400) last night, but the charity said the online bid would still need to be verified.
The painting was donated anonymously to the charity shop earlier this week, and could be seen hanging in the window of the shop on New York’s East 23rd Street.
Writing on his website about the donated painting, Banksy only said: “A thrift store painting vandalised then re-donated to the thrift store.”
Works by the artist have popped up around New York City in October, including a statue of Ronald McDonald and a tribute to the twin towers.
For his last piece of work, the artist spray-painted his name “Banksy” in bubble writing onto a building in the middle of the Long Island Expressway in Queens yesterday.
Speaking about the end of his residency in New York, the artist said via an audio guide narrated by an American on his website: “Well, this is the last day of the show, and I’d like to say we’re going out on a high note.
“I guess in a way, we are. This is a sideways take on the ubiquitous spray painted bubble lettering that actually floats. It’s an homage of sorts to the most prevalent form of graffiti, in the city that invented it, for the modern era. Or it’s another Banksy piece that’s full of hot air."
The audio guide said the "cohesive message" behind the month-long show was Banksy's assertion that "art should live outside, amongst us".
It said: “And rather than street art being a fad, maybe it’s the last 1,000 years of art history that are the blip when art came inside in service of the Church and institutions. But art’s rightful place is on the cave walls of our communities where it can act as a public service, provoke debate, voice concerns, forge identities.
“The world we live in today is run, visually at least, by traffic signs, billboards and planning committees. Is that it? Don’t we want to live in a world run by art, not just decorated by it?”
Register for free to continue reading
Registration is a free and easy way to support our truly independent journalism
By registering, you will also enjoy limited access to Premium articles, exclusive newsletters, commenting, and virtual events with our leading journalists
Already have an account? sign in
Join our new commenting forum
Join thought-provoking conversations, follow other Independent readers and see their replies