The maximum penalty for the offence will be six months in jail, a £5,000 fine or both.
Squatting in a residential building in England and Wales becomes a criminal offence on Saturday, meaning squatters would face jail or a fine.
It follows a government consultation on the issue last summer.
Ministers said it would provide better protection for homeowners and "slam shut the door on squatters once and for all".
But campaigners warned the new law could criminalise vulnerable people and lead to an increase in rough sleeping.
The new offence will protect homeowners or legitimate tenants who find their home has been taken over by squatters.
It will also protect owners of vacant residential properties such as landlords, local authorities and second home owners.
'Squatters rights'The maximum penalty for the offence will be six months in jail, a £5,000 fine, or both.
Housing Minister Grants Shapps said: "For too long, hardworking people have faced long legal battles to get their homes back from squatters, and repair bills reaching into the thousands when they finally leave.
"No longer will there be so-called 'squatters rights'. Instead, from next week, we're tipping the scales of justice back in favour of the homeowner and making the law crystal clear: entering a property with the intention of squatting will be a criminal offence."
But Leslie Morphy, chief executive of the homeless charity Crisis said legal provisions were already in place for removing squatters from people's homes and the new offence could leave vulnerable people facing jail or a fine they cannot pay.
She said: "It will do nothing to address the underlying reasons why vulnerable people squat in the first place - their homelessness and a lack of affordable housing.
"Ultimately the Government needs to tackle why homeless people squat in the first place by helping not punishing them."
Chief Constable Phil Gormley, the Association of Chief Police Officer's lead on uniformed operations, welcomed the move saying police could "now act immediately and remove squatters directly from properties".