"My father and my mother and my sister are going through a very serious health challenge and, to be honest, at times I have been in pain not being able to spend the time that I should.
The Liberal Party will elect a new leader, and new premier of the state, at a party room meeting next week, Baird said.
"Serving as Premier of NSW has been a tremendous honour but I have made clear from the beginning that I was in politics to make a difference, and then move on," he said.
He said he had decided it was "the perfect time to hand over to a new premier".
Baird's resignation from parliament will take effect immediately after the new premier is elected.
The father-of-three, 48, became NSW premier in April 2014, assuming the leadership role after Barry O'Farrell's resignation.
"I am immensely proud of what Barry O'Farrell and I - together with Andrew Stoner, Troy Grant, John Barilaro and our teams - have achieved over the past six years," he said.
"We have repaired the state budget, rejuvenated the economy, created jobs in unprecedented numbers, boosted frontline services and unleashed an infrastructure boom in Sydney and the regions, which everyone can see with their own eyes."
It will prompt a by-election in the Sydney seat of Manly, which he has held since 2007.
"It has also been an immense honour to represent the people of Manly since 2007, and my retirement from politics will enable fresh leadership for my community," he said.
There appeared no inkling the shock resignation was coming this morning and Baird's announcement, released via Twitter, apparently came as a shock to all in political circles.
A devout Christian, Melbourne-born Baird initially intended to pursue a future in the Anglican Ministry, but had a change of heart while preparing to enter the clergy.
Baird began his professional career as an investment banker and had his first crack at politics in 1999.
The Sydney-based banker missed out on preselection for the seat of Manly and returned to the finance industry before successfully claiming the seat in the 2007 state election.
Baird quickly rose through the Liberal party ranks. He was promoted to shadow treasurer in 2008, and became treasurer in 2011 with the election of the Liberal government led by Barry O'Farrell.
It was in 2014, following O'Farrell's resignation that Baird was elected unopposed as leader of the NSW Liberal Party, and became Premier.