user1291: I was playing a game with a friend online. A situation came up where he put me in check with his bishop, and I moved my rook to block it. His king was on the g file and my rook was on g2. The website said he was in check. 
[fen "6k1/8/2b5/8/8/8/6R1/7K b - - 0 1"]

Position after Rg2+ , showing only the pieces important to the question.
I didn't think it could be a check, since legally, I could not attack his king or move my rook because it would put my king in check. Can a piece put a king in check even though moving that piece would be an illegal move? 
This is odd, because since he was forced to respond to the check, I was able to make a couple moves and leave him with only a couple of blocked pawns, while I was able to promote a pawn and mate in a couple moves. I won, but it feels like cheating. He had a better position and should have won. 

user17: A piece can give check even when it is pinned. This is the main "exception" to the rule that a pinned piece cannot move.
The reason is, your pinned piece giving check "takes" the opposing king first. (In this case, it's your rook at g2 on the g file.) That's BEFORE his bishop would take your king.
So by the laws of the game, your friend had to move his king, you made your moves, and won. All perfectly legal (and tactical). Good work.

user291: Can a piece put a king in check even though moving that piece would be an illegal move? 
Yes.
One way to see why this makes sense is to imagine "checkless chess", a game that is just like chess, but you win by capturing the king, not by delivering checkmate, and no one is forced to move out of check. This game is exactly the same as chess except that it ends one move later and stalemate is generally a loss for the side that would have to "move into check".
In checkless chess, he moved Bc6, then you moved Rg2, and if he makes some other random move, you can win with Rg2 x Kg8 before he wins with Bc6 x Kh1. So your check really is more "important" than his pin.

user924: Yes. Besides making sense, it's also explicitly stated in the rules of the game:
3.9
The king is said to be 'in check' if it is attacked by one or more of the opponent's pieces, even if such pieces are constrained from moving to that square because they would then leave or place their own king in check. No piece can be moved that will either expose the king of the same colour to check or leave that king in check.
Source: Laws of Chess on the FIDE site

1291: <p>I was playing a game with a friend online. A situation came up where he put me in check with his bishop, and I moved my rook to block it. His king was on the g file and my rook was on g2. The website said he was in check. </p>

<pre><code>[fen "6k1/8/2b5/8/8/8/6R1/7K b - - 0 1"]
</code></pre>

<p><em>Position after</em> <code>Rg2+</code> <em>, showing only the pieces important to the question.</em></p>

<p>I didn't think it could be a check, since legally, I could not attack his king or move my rook because it would put my king in check. Can a piece put a king in check even though moving that piece would be an illegal move? </p>

<p>This is odd, because since he was forced to respond to the check, I was able to make a couple moves and leave him with only a couple of blocked pawns, while I was able to promote a pawn and mate in a couple moves. I won, but it feels like cheating. He had a better position and should have won. </p>
 17: <p>A piece can give check even when it is pinned. This is the main "exception" to the rule that a pinned piece cannot move.</p>

<p>The reason is, your pinned piece giving check "takes" the opposing king first. (In this case, it's your rook at g2 on the g file.) That's BEFORE his bishop would take your king.</p>

<p>So by the laws of the game, your friend had to move his king, you made your moves, and won. All perfectly legal (and tactical). Good work.</p>
 291: <p><em>Can a piece put a king in check even though moving that piece would be an illegal move?</em> </p>

<p>Yes.</p>

<p>One way to see why this makes sense is to imagine "checkless chess", a game that is just like chess, but you win by capturing the king, not by delivering checkmate, and no one is forced to move out of check. This game is exactly the same as chess except that it ends one move later and stalemate is generally a loss for the side that would have to "move into check".</p>

<p>In checkless chess, he moved Bc6, then you moved Rg2, and if he makes some other random move, you can win with Rg2 x Kg8 before he wins with Bc6 x Kh1. So your check really is more "important" than his pin.</p>
 924: <p>Yes. Besides making sense, it's also explicitly stated in the rules of the game:</p>

<p><em>3.9
The king is said to be 'in check' if it is attacked by one or more of the opponent's pieces, even if such pieces are constrained from moving to that square because they would then leave or place their own king in check. No piece can be moved that will either expose the king of the same colour to check or leave that king in check.</em></p>

<p>Source: <a href="http://www.fide.com/fide/handbook.html?id=124&amp;view=article">Laws of Chess on the FIDE site</a></p>
