What primer should be used before painting over nicotine stained walls?
I've also had good luck with Zinsser B-I-N, which is shellac based. This might be overkill for your situation, but I've used it with great success on hard to cover stains.
But it looks like they have an even better version called KILZ MAX™ Primer. I have never used this one but it does mention covering nicotine:
KILZ MAX™ is a water-based primer, sealer and stainblocker developed with new technology that’s formulated to perform like an oil-based product. It tackles tough stains including medium to heavy water damage, rust, smoke, nicotine, grease, tannin, ink, pencil, felt marker, pet stains and more. KILZ MAX also seals pet and smoke odors. Topcoat with latex or oil-based paint.
Kilz does recommend cleaning the surface; see the "Surface Preparation" section for all of their recommendations. The most relevant section is this:
The surface must be clean, free of dust, grease, wax, peeling paint, mold, mildew and wallpaper paste. If washing is necessary, use a non-soapy detergent or a TSP substitute. Rinse well and allow to dry.
Agreed with all the "clean first" comments, but you might try tri-sodium phosphate (TSP) as your detergent, as it also etches the surface, providing a "nap" on the paint to make coats stick.
My favourite primer for difficult situations is white pigmented shellac, like the B-I-N product mentioned, but there are generic off-brand versions that are cheaper. It is generally titanium dioxide and shellac powder, in an alcohol base. It is suitable for both water- and oil-based paint, and is indeed ideal for covering an oil-based stain with water-based paint for that reason. Because it is alcohol-based, it dries quickly and cleans up easily.
The painted surfaces and wallboard are porous, allowing the smoke molecules and odors to become embedded, in the walls, ceilings, carpeting, and furniture. With any temperature or humidly change the embedded odors and particles reemerge creating unhealthy air quality.
Out-gassing (sometimes called off-gassing, particularly when about indoor air quality) is the release of a gas that has dissolved, trapped, frozen or absorbed in some material. Out gassing can include sublimation and evaporation, which are phase transitions of a substance into a gas, as well as desorption, seepage from cracks or internal volumes and gaseous products of slow chemical reactions. We found using Seal Krete or shellac as a primer that only one coat of paint is required saving time and money. Both Shellac and Seal Krete has the viscosity of water use a short nap roller and do not overload as it will run on the surface. If you chose to use a sealer or shellac as a primer, when you're ready to paint use paint with built in primer, higher viscosity than regular paint, thus only one coat. Now you’re ready to paint, add the ionic paint additive to the paint, turns the wall surface into a permanent air purification system