In my experience of teaching the rules of chess, beginners have the hardest time with en passant. When it comes to tournament players, however, it's castling that causes most of the difficulties. The most notable and probably the most famous incident came in the 21st game of the final Candidates match between Viktor Korchnoi and Anatoly Karpov in 1974. Korchnoi wanted to castle queenside, but before doing so he asked the arbiter if it was legal to do so if his rook would pass over an attack on the b1 square. (It was, of course, and Korchnoi castled and won the game.)
More often problems involving experienced players and castling arise because of forgetfulness. Perhaps the black king moved somewhere and then returned to e8, and then the player tries - and maybe even succeeds! - in castling. Or perhaps the relevant rook made a similar back and forth trip. In perhaps the most remarkable case, Wolfgang Heidenfeld castled kingside on move 10, brought his king back to e1 on move 29 and then castled queenside on move 33! (It was an unwittingly resourceful way to save his king from a dangerous attack, but he lost anyway.)
Of course, this sort of thing doesn't happen very often in professional chess, but it does happen sometimes. A recent case - or at least an attempted case - came in the recently completed European Championship, in a game between Anton Korobov and Dragan Solak. In the final position Black was in big trouble, but if he could have castled he could have put up some resistance. Only one slight problem: his rook had already moved twice, and both the arbiter and his opponent prevented him from carrying out his intended, illegal move. Without that resource, and presumably forced to make a useless or even harmful move with his king, Solak simply resigned.
So once again we see what we all know but sometimes forget: grandmasters are human like the rest of us: they blunder, sometimes they can't mate with a bishop and a knight, and on occasion they make illegal moves, or try to!
HT: Marc Beishon