Yes, WD-40 can be used to remove gum from carpets. Spritz the gum with the solution and then rub it between two pieces of carpet. Repeat the procedure until the gum comes loose from the carpet.