Drug users caught with small amounts of illicit substances will have the option to get counselling rather than go to court, under a major overhaul of NSW laws.

The government is expected to introduce to parliament the plan to divert drug users from court and towards rehabilitation programs.

Attorney-General Michael Daley said the proposed scheme would be implemented at the discretion of police officers.

Under the proposed changes, people caught with small amounts of illegal drugs could be issued with a $400 on-the-spot fine.

They would have the choice to either pay the penalty, dispute it in court or attend a mandatory counselling program run by NSW Health.