The Scot - number four seed - won the first set 6-4 before the 32-year-old Croat levelled with a 6-4 win in the second. Murray took the third set comfortably with a 6-1 win but was taken down to a close tie-break in the fourth, eventually winning 7-6 (7-3).
Speaking afterwards, Murray rated himself "eight out of ten" for the match, adding: "I feel like I played really good tennis tonight. The match was a really, really high standard. Matches are only going to get tougher now but I'm ready."
Murray goes on to face France's Richard Gasquet in the fourth round.
Play was called off on all other courts earlier evening due to rain. Rafel Nadal was leading over Luxembourg's Gilles Muller, taking the first set 7-6 (8-6).