Tape Off the Carpet
When painting baseboard, some painters slip masking tape under the baseboard. But this is time-consuming and doesn't create a seep-proof seal between the baseboard and the carpet. Instead, press the tape against the baseboard, covering about 1/4 in. of the bottom edge. Press down hard on the carpet while you apply the tape. That way, the tape will hold the carpet down while you paint. Later, when you remove the tape, the carpet will rise and cover the unpainted edge of the baseboard.
Use a high-quality tape for this job because it grabs and holds the baseboard better. Add a strip of cheap tape to create a wider shield over the carpet. Finally, spread a drop cloth over the tape. This technique won't work if your carpet has a very low pile or if you have no padding under the carpet.