The 24-year-old former Wests Tigers and Hull FC player has been a key member of the Trinity squad over the last two years and was the hero of their Dacia Magic Weekend win over Catalans Dragons a year ago with the last-gasp winning drop-goal from halfway.
Wakefield coach Chris Chester said: "I am delighted that we've managed to agree a new deal with Miller. It's important for us to keep our best players at the club, and by doing so it shows we are heading in the right direction.
"Jacob is still a young player with exceptional talent. I am looking forward to working with him for another two years and see him improve even more."
Miller said: "I have really enjoyed my time here, so I'm very happy to have signed a new deal and hopefully we can take that next step and keep building towards the future."
Miller's regular half-back partner Liam Finn recently signed a new deal for 2018 and now Chester is hoping to complete a hat-trick by securing the future of his third half-back Sam Williams, who is also out of contract this year.