Disclosed herein is a pyrazolotriazolopyrimidine derivative or a stereoisomer thereof, or a pharmaceutically acceptable salt thereof useful as an A2A receptor antagonist, and a pharmaceutical composition comprising the same. Also disclosed herein is a method of treating cancer using the pyrazolotriazolopyrimidine derivative or a stereoisomer thereof, or a pharmaceutically acceptable salt thereof as an A2A receptor antagonist.