To sell it first (or at all) is not a requirement. The requirement is to create it first.
http://copyright.gov/circs/circ01.pdf"Copyright is secured automatically when the work is cre
ated, and a work is “created” when it is fixed in a copy or
phonorecord for the first time. “Copies” are material objects
from which a work can be read or visually perceived either
directly or with the aid of a machine or device, such as books,
manuscripts, sheet music, film, videotape, or microfilm."