The Online Safety Bill also seeks to strengthen the right to freedom of expression, and ensure democratic political debate and journalistic content is protected, the government said on Tuesday.
"It’s time for tech companies to be held to account and to protect the British people from harm. If they fail to do so, they will face penalties," interior minister Priti Patel said.
Tech firms have been accused of doing far too little to address online abuse, with football clubs and other sporting authorities boycotting the world's biggest social media platforms last month to highlight the growing problem.
The bill will place a duty of care on social media firms and websites to ensure they take swift action to remove illegal content, such as hate crimes, harassment and threats directed at individuals, including abuse which falls below the criminal threshold.
There will also be a requirement to remove and limit the spread of terrorist material, suicide content and child sexual abuse, which they would need to report to the authorities.
Those companies which fail to do so face hefty fines from regulator Ofcom which can also block access to their sites.
"The draft Bill contains reserved powers for Ofcom to pursue criminal action against named senior managers whose companies do not comply with Ofcom’s requests for information," the government said.
"These will be introduced if tech companies fail to live up to their new responsibilities."
The proposed law will also require companies to safeguard freedom of expression, and reinstate material unfairly removed.
It will also forbid tech firms from discriminating against particular political viewpoints, and Ofcom will hold them to account for the arbitrary removal of journalistic content, the government added.