The government is promising strict safeguards, including a ban on councils accessing people`s internet records and a new offence of misuse of the data.
Ministers are also facing calls for judges to sign warrants to access the content of digital records.
Currently responsibility lies with Home Secretary Theresa May.
The draft bill, which David Cameron says is one of the most important pieces of legislation of this parliament, will be published in the House of Commons on Wednesday.
It will be examined in detail by both Houses of Parliament before the final bill is voted on next year.
More about: