Liverpool said on their website that the transfer was expected to be completed in the next few days. No financial details were given.
The big forward, currently preparing with the Dutch squad for Euro 2012 in Poland and Ukraine, arrived at Anfield from Feyenoord in 2006 and soon showed a knack for scoring important goals in big games.
He made 285 appearances for Liverpool, scoring 71 goals including a hat-trick against Manchester United as well as a late goal against winners AC Milan in the 2007 Champions League final.
The 31-year-old also scored in the League Cup final against Cardiff City at Wembley in February that Liverpool won on penalties.
The announcement of his departure comes two days after Liverpool named Brendan Rodgers as their new manager.
Get the best features, fun and footballing frolics straight to your inbox every week.
Thank you for signing up to Four Four Two. You will receive a verification email shortly.
There was a problem. Please refresh the page and try again.