Possible Checkmate by Castling
I remember that someone asked last winter on Chess.com whether there has been a checkmate in a game given by castling. The following game score, from "The Golden Treasury of Chess", by I. A. Horowitz, c. 1956, 1943, page 108, game #179 does not end with a checkmate by castling; but, if White had chosen to, he could have.
Game 179. City of London Chess Club, 1912
Edward Lasker, White, G. A. Thomas, Black.
1) d4 f5, 2) Nc3 Nf6, 3) Nf3 e6, 4) Bg5 Be7, 5) Bxf6 Bxf6, 6) e4 f5xe4, 7) Nxe4 b6, 8) Ne5 O-O, 9) Bd3 Bb7, 10) Qh5 Qe7. Here the book says that White announced mate in 8.
11) Qxh7+ Kxh7, 12) Nxf6+ Kh6, 13) Ng4+ Kg5, 14) h4+ Kf4, 15) g3+ Kf3, 16) Be2+ Kg2, 17) Rh2+ Kg1.
The book says that White checkmated by 18) Kd2#. The White Rook on a1 gives checkmate to the Black King on g1. The same effect could have also been given by 18) O-O-O#.
I apologize for the poor format of this post. I did not know how to post the score in columns, (the tab key didn't work like I thought it would), nor did I know how to set the game up as puzzle. I also did not offer any annotation for the moves because I have a rating of only 800 (Chessmaster 6000) and do not feel qualified to critique.
I have yet to run across a game that ended, or could have ended, by O-O#.