The former Spanish international secured a positive first step to his return to the club, with three points on the board, but his side were fortunate not to concede a late equaliser.
However, La Blaugrana stepped it up a gear after the restart, with Dutch star Memphis Depay picking himself up to convert from the penalty spot.
But despite appearing set to go on and clinch a comfortable victory over their neighbours, Barcelona were forced to withstand a flurry of late pressure.
In form star Raul de Tomas rattled the post from a free kick before substitute Landry Dimata missed an open goal in the final moments.
Up next for Xavi is a midweek Champions League clash against Benfica with a win needed to secure their place in the last 16 in 2022.
Images via Getty Images