Ouch - something must be very bad to yield so much noise. It might be worth running the headphones through a mixer instead of straight into the computer. If you want a pro solution, it starts at $59: http://www.soundprofessionals.com/cgi-bin/gold/category/110/...
But if you have a mixer, why not just buy proper microphones? A cheap mic is around $5, so buying two of those would yield vastly superior recordings for even less. This is merely a curiosity for unusual situations where standard equipment is not available.
Sometimes you want to record discreetly or covertly. Using ear-mounted mics gives you an unusually well-defined soundfield; this can be emulated with head-related transfer functions, but not as well as the real thing. Recording with bad headphones as mics is of course trashy sounding, but that's often interesting for musical purposes.