Black ink on carpet is a stain that may make you feel your carpet is doomed. In most cases, however, you can relax. You can nearly always remove the stain and save your carpet even when the ink is supposedly permanent. Just keep the following in mind when treating the carpet for this kind of stain: be patient and blot the stain rather than wiping it. Wiping just smears the ink over your carpet---blotting is more effective for removing these stains (and most other kinds of carpet stains).
Test WD-40 on an inconspicuous area of carpeting to make sure the carpet will not fade.
Do this by spraying the WD-40 on a small section and then wiping the carpet with a clean, white cloth. After testing, spray the ink stain with WD-40.
Wait one minute and then blot the stain with a dry paper towel. Continue blotting until you've retrieved as much black ink as possible. If more remains on the carpet, spray again with WD-40.
Blot the carpet again with dry paper towels. Next, dampen a cloth and blot the area until all of the ink is gone.
Mix 1/2 tsp of dish detergent with warm water in a bowl. Use a sponge dipped in this to wash the are of the carpet (to remove traces of WD-40 and any remaining ink). Rinse the carpet with a damp cloth and let the carpet air-dry.
Instead of WD-40, you can try hairspray or rubbing alcohol. After applying these, the rest of the steps are the same. These products work because they contain chemical solvents that dissolve the ink. Because they dissolve ink, they may also dissolve some dyes--so always check an inconspicuous area before using these products on large sections of carpeting.
WD-40 is flammable.