The most senior water official in NSW, Gavin Hanlon, has resigned two months after he was exposed offering to share confidential government documents with irrigation lobbyists.

Mr Hanlon had served as a Deputy Director General of the NSW Department of Primary Industries in its water division during discussions about the future of the state's involvement in the $13 billion Murray-Darling Basin Plan to replenish the river system.

According to Four Corners, Gavin Hanlon was caught on tape offering to share confidential information with irrigation lobbyists.

ABC's Four Corners program aired in July recordings of Mr Hanlon offering to provide irrigation lobbyists campaigning against the conservation plan with access to classified documents via an online Dropbox account. The offer was made to irrigator bodies which met with select DPI staff by teleconference on at least four occasions, on Mr Hanlon's invitation.

Recordings of one of these teleconferences showed the NSW government had considered opting out of the plan, which governs water use in NSW, Victoria, Queensland, South Australia and the ACT.