The 27-year-old Zimbabwe-born naturalised Englishman -- who has appeared in 21 Tests scoring four centuries -- had a year remaining on his present contract and said the new deal would allow him to focus solely on on the pitch matters.
"The new deal has come at the perfect time for me," he told the Yorkshire website.
"I can now purely focus on the captaincy, batting and scoring runs.
"There are no outside worries. For me it's all about focusing on the main task; scoring runs and winning matches for Yorkshire," added Ballance, who moved to England in 2006 and joined Yorkshire in 2008.
Andrew Gale, his predecessor as skipper and now head coach, said it was a filip for the county to have secured his services for two more years.
"He's one of the best batsmen in the country and his record backs that up," said Gale.
"He's done it at international level too for England so we want to keep him at the club as long as we can. I believe he's got all the qualities to be a success for Yorkshire."
First Published: March 21, 2017, 8:09 PM IST