The 52-year-old MacGregor was caddying for Alastair Forsyth of Scotland when he collapsed on the ninth fairway -- Forsyth's final hole.
The European Tour said in a statement that "it is with great sadness and deep regret that we report the untimely passing of caddie Ian MacGregor during play on the final day of the Madeira Islands Open."
The tournament, which had already been cut to 36 holes because of fog delays, was suspended but resumed following consultations with players and caddies. Daniel Brooks won the tournament in a playoff.
Gary Player was among those who paid tribute to MacGregor on Twitter, writing:
RIP Big Mac. You will be missed. My condolences
- Gary Player (@garyplayer) May 11, 2014