Almost nine years after he entered the NSW Parliament, former Labor leader and union boss John Robertson will quit politics at the end of the month.

Mr Robertson has accepted a job as executive general manager at the not-for-profit organisation Foodbank, which acts as a conduit between the retail industry and charities to distribute food to the needy.

"I'm going to work in a bank, but unlike Mike Baird people like this bank," Mr Robertson quipped, in reference to the former Premier's role at National Australia Bank after leaving politics in January.

Mr Robertson's decision to resign from parliament on August 25 will spark a second byelection in coming months after Nationals MP Katrina Hodgkinson announced she would resign at the end of the month.