Below is the explanation why it is out. For those who don't want to read, its all about first contact with the ball.
Law 19.4 (specially written for these boundary catches) stipulates the following
A ball may be caught, subject to the provisions of Law 32, or fielded after it has crossed the boundary, provided that
(i) the first contact with the ball is by a fielder either with some part of his person grounded within the boundary, or whose final contact with the ground before touching the ball was within the boundary.
(ii) neither the ball, nor any fielder in contact with the ball, touches or is grounded beyond, the boundary at any time during the act of making the catch or of fielding the ball.
The act of making the catch, or of fielding the ball, shall start from the time when the ball first comes into contact with some part of a fielder’s person and shall end when a fielder obtains complete control both over the ball and over his own movement and has no part of his person touching or grounded beyond the boundary.