user18029: Has checkmate ever been achieved by castling kingside in a high-level game?
I asked an AI large language model, but it listed games which certainly didn't achieve checkmate with castling kingside. I also tried searching the web but didn't come across any.

user34197: According to that CQL query :
cql(input Megabase2023.pgn)

mate
move previous from [Kk] o-o

There are twelve games where the castling king side delivered a checkmate, 4 of which played by 1600+ players

[Title "Wiedermann, Daniel (2048) v. Wagner, Leopold Franziskus (2168) - Blitz Playchess.com (2020)"]
[FEN ""]

1.d4 Nf6 2.c4 e6 3.Nc3 Bb4 4.f3 Bxc3+ 5.bxc3 O-O 6.e4 d5
7.cxd5 exd5 8.e5 Nfd7 9.f4 c5 10.Nf3 Nc6 11.Bd3 c4 12.Bxh7+ Kxh7 13.Ng5+ Kg6
14.f5+ Kxf5 15.Qh5 Nf6 16.O-O#

[TITLE "Kreyssig, Bruno (1828) v. Heilmann, Karl Ludwig (1665) - Forchheim 12th 2013"]
[FEN ""]

1.e4 c5 2.Nf3 d6 3.d4 cxd4 4.Nxd4 Nf6 5.Nc3 g6 6.Be3 Bg7
7.Be2 O-O 8.f4 Nc6 9.Nb3 Be6 10.g4 Na5 11.g5 Ne8 12.h4 Bc4 13.h5 Bxe2 14.Qxe2
Qc7 15.Nd5 Qd8 16.hxg6 hxg6 17.Qh2 f6 18.f5 fxg5 19.Qh7+ Kf7 20.fxg6+ Ke6 21.
Qh3+ Ke5 22.Bd4+ Kxe4 23.Nc3+ Kf4 24.O-O#


[TITLE "Moreno, Jose Enrique (1622) v. Pereira, Gerardo (1400) - Montevideo Duchamp Cup 1st 2017"]
[FEN ""]

1.e4 Nc6 2.d4 d5 3.e5 e6 4.Nf3 Be7 5.c4 b6 6.Nc3 Ba6 7.
cxd5 Bxf1 8.dxc6 Ba6 9.a3 h6 10.Be3 f6 11.b4 fxe5 12.Nxe5 Bf6 13.Qh5+ Ke7 14.
Ng6+ Kd6 15.b5 Qe8 16.Bf4+ e5 17.dxe5+ Kc5 18.Be3+ Kc4 19.Qe2+ Kxc3 20.Rc1+ Kb3
21.Qc4+ Kxa3 22.Rc3+ Kb2 23.Qb3+ Ka1 24.O-O#


[Title "Naqopia, Giorgi (1680) v. Nurijanyan, Alex (1610) - Poti op 14th 2019"]
[FEN ""]

1.e4 c5 2.b4 cxb4 3.a3 d5 4.exd5 Qxd5 5.Bb2 Nf6 6.axb4 Bg4 7.Ne2 Nc6 8.Nbc3 Qd7 9.h3 Bh5 10.Qb1 e5 11.b5 Nb4 12.Ba3 a5 13.bxa6 Rxa6
14.Ng3 Rb6 15.Bxb4 Bxb4 16.Ra8+ Ke7 17.Rxh8 Bxc3 18.Nf5+ Qxf5 19.Qxb6 Qe4+ 20.
Qe3 Qb4 21.f3 Nd5 22.Qg5+ f6 23.Qxg7+ Ke6 24.Qg8+ Kf5 25.Bd3+ Kf4 26.g3+ Kxf3
27.O-O#


18029: <p>Has checkmate ever been achieved by castling kingside in a high-level game?</p>
<p>I asked an AI large language model, but it listed games which certainly didn't achieve checkmate with castling kingside. I also tried searching the web but didn't come across any.</p>
 34197: <p>According to that <a href="http://gadycosteff.com/cql" rel="noreferrer">CQL</a> query :</p>
<pre><code>cql(input Megabase2023.pgn)

mate
move previous from [Kk] o-o
</code></pre>
<p>There are <a href="https://gist.github.com/signed-log/f1f3d221dfe1353ac70bae31441b2614" rel="noreferrer">twelve games</a> where the castling king side delivered a checkmate, 4 of which played by 1600+ players</p>
<hr />
<pre><code>[Title &quot;Wiedermann, Daniel (2048) v. Wagner, Leopold Franziskus (2168) - Blitz Playchess.com (2020)&quot;]
[FEN &quot;&quot;]

1.d4 Nf6 2.c4 e6 3.Nc3 Bb4 4.f3 Bxc3+ 5.bxc3 O-O 6.e4 d5
7.cxd5 exd5 8.e5 Nfd7 9.f4 c5 10.Nf3 Nc6 11.Bd3 c4 12.Bxh7+ Kxh7 13.Ng5+ Kg6
14.f5+ Kxf5 15.Qh5 Nf6 16.O-O#
</code></pre>
<pre><code>[TITLE &quot;Kreyssig, Bruno (1828) v. Heilmann, Karl Ludwig (1665) - Forchheim 12th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