Owning a private collection of nearly 140 artworks by luminaries like Jean-Michel Basquiat, Andy Warhol and Roy Lichtenstein would be a godsend for most arts organizations, but it was a burden for the Keith Haring Foundation. Legal counsel had warned the nonprofit for years that keeping a collection made by artists other than its founder might fail to serve its charitable purpose. So last year the foundation began arranging with Sotheby’s to sell the artworks in an online auction called “Dear Keith,” with all proceeds benefiting the Center, an L.G.B.T.Q. community organization in the West Village. The sale is scheduled to begin on Sept. 26 and is expected to raise nearly $1 million with a selection ranging from a $100 painting by David Bowes to a $250,000 Warhol print featuring Mr. Haring and his lover Juan Dubose. An exhibition of the collection will also take place online and by appointment at the Sotheby’s headquarters in Manhattan.