user11748: Garry Kasparov was born in 1963 in Baku, Azerbaijan, at the time part of the USSR, Soviet Union.
According to the news he has also acquired Croatian citizenship. 
In his comeback tournament in the summer of 2017 he still used the Russian flag.
However I did see a Croatian flag together with the Russian one on the poster behind him at the signature sessions between the matches.
But why did Garry Kasparov not play under the flag of Azerbaijan?

user33483: He did not play under the flag of Azerbaijan in his comeback tournament because he, and many of his relatives fled Baku in 1990, fearing for their lives... Pogroms by lynch mobs of Azeri nationalists.
https://www.youtube.com/watch?v=RqXubG9MV10

user14081: He has an RF (Russian Federation) citizenship or, at least, he did at some point. In fact, he was the head of a minor party in RF which even held a few seats in the RF parliament at some point.

user4418: 
But why did Garry Kasparov not play under the flag of Azerbaijan?

Because his FIDE registration is with Russia.
If he wants to change his registration to Azerbaijan then the following also have to happen -
1) He has to have a valid claim like residency, nationality or birth, so birth would do.
2) Azerbaijan chess federation have to agree.
3) An administration fee has to be paid to FIDE and possibly a "transfer" fee also. Because Kasparov is a highly rated GM this would be very large. I think when Caruana transferred from Italy to US it was more than $50,000.
The section of the FIDE handbook which describes the rules is here.

11748: <p>Garry Kasparov was born in 1963 in Baku, Azerbaijan, at the time part of the USSR, Soviet Union.</p>

<p>According to the <a href="https://www.theguardian.com/world/2014/feb/28/chess-champion-garry-kasparov-croatian-citizenship" rel="noreferrer">news</a> he has also acquired Croatian citizenship. </p>

<p>In his comeback tournament in the summer of 2017 he still used the Russian flag.
However I did see a Croatian flag together with the Russian one on the poster behind him at the signature sessions between the matches.</p>

<p>But why did Garry Kasparov not play under the flag of Azerbaijan?</p>
 33483: <p>He did not play under the flag of Azerbaijan in his comeback tournament because he, and many of his relatives fled Baku in 1990, fearing for their lives... Pogroms by lynch mobs of Azeri nationalists.
<a href="https://www.youtube.com/watch?v=RqXubG9MV10" rel="nofollow noreferrer">https://www.youtube.com/watch?v=RqXubG9MV10</a></p>
 14081: <p>He has an RF (Russian Federation) citizenship or, at least, he did at some point. In fact, he was the head of a minor party in RF which even held a few seats in the RF parliament at some point.</p>
 4418: <blockquote>
  <p>But why did Garry Kasparov not play under the flag of Azerbaijan?</p>
</blockquote>

<p>Because <a href="https://ratings.fide.com/card.phtml?event=4100018" rel="noreferrer">his FIDE registration is with Russia</a>.</p>

<p>If he wants to change his registration to Azerbaijan then the following also have to happen -</p>

<p>1) He has to have a valid claim like residency, nationality or birth, so birth would do.</p>

<p>2) Azerbaijan chess federation have to agree.</p>

<p>3) An administration fee has to be paid to FIDE and possibly a "transfer" fee also. Because Kasparov is a highly rated GM this would be very large. I think when Caruana transferred from Italy to US it was more than $50,000.</p>

<p>The section of the FIDE handbook which describes the rules is <a href="https://www.fide.com/fide/handbook.html?id=13&amp;view=category" rel="noreferrer">here</a>.</p>
