Islamic State fighters are preventing civilians from fleeing the city of Ramadi—and threatening to kill those who try—after Iraqi forces warned people to leave ahead of an impending offensive, residents said Tuesday.

Iraqi forces have been airdropping leaflets since Sunday warning residents to get out before they launch an operation to recapture the Islamic State stronghold. Residents said the extremist group, also known as ISIS, wants to use civilians as human shields.

“ISIS...