A compound semiconductor device, comprising: a substrate; a first buffer layer formed over the substrate; a second buffer layer (3; 13) formed over the first buffer layer and larger in electron affinity than the first buffer layer; a third buffer layer (4; 14) formed over the second buffer layer and smaller in electron affinity than the second buffer layer; a channel layer (5, 6) formed over the third buffer layer; and an electron supply layer (6, 7) formed over the channel layer, characterised in that the second buffer layer has a composition represented by Al x1 Ga 1-x1 N (0.1 ≦ x1 ≦ 0.5) and a thickness of about 10 nm to 300 nm, the third buffer layer has a composition represented by Al x2 Ga 1-x2 N (0.3 ≦ x2 ≦ 1) and a thickness of about 2 nm to 100 nm, a distance from an upper surface of the first buffer layer to an interface between the third buffer layer and the channel layer (5, 6) is about 12 nm to 400 nm, and a value of x1 is smaller than a value of x2, or the second buffer layer has a composition represented by In y1 Al 1-y1 N (0.1 ≦ y1 ≦ 0.25) and a thickness of about 10 nm to 500 nm, the third buffer layer has a composition represented by In y2 Al 1-y2 N (0.1 ≦ y2 ≦ 0.25) and a thickness of about 5 nm to 500 nm, a distance from an upper surface of the first buffer layer to an interface between the third buffer layer and the channel layer (5, 6) is about 15 nm to 1000 nm, and a value of y1 is larger than a value of y2, or the second buffer layer has a composition represented by In y1 Al 1-y1 N (0.1 ≦ y1 ≦ 0.25) and a thickness of about 10 nm to 500 nm, the third buffer layer has a composition represented by Al x2 Ga 1-x2 N (0.3 ≦ x2 ≦ 1) and a thickness of about 2 nm to 100 nm, and a distance from an upper surface of the first buffer layer to an interface between the third buffer layer and the channel layer (5, 6) is about 12 nm to 600 nm. a substrate; a first buffer layer formed over the substrate; a second buffer layer (3; 13) formed over the first buffer layer and larger in electron affinity than the first buffer layer; a third buffer layer (4; 14) formed over the second buffer layer and smaller in electron affinity than the second buffer layer; a channel layer (5, 6) formed over the third buffer layer; and an electron supply layer (6, 7) formed over the channel layer, characterised in that the second buffer layer has a composition represented by Al x1 Ga 1-x1 N (0.1 ≦ x1 ≦ 0.5) and a thickness of about 10 nm to 300 nm, the third buffer layer has a composition represented by Al x2 Ga 1-x2 N (0.3 ≦ x2 ≦ 1) and a thickness of about 2 nm to 100 nm, a distance from an upper surface of the first buffer layer to an interface between the third buffer layer and the channel layer (5, 6) is about 12 nm to 400 nm, and a value of x1 is smaller than a value of x2, or the second buffer layer has a composition represented by In y1 Al 1-y1 N (0.1 ≦ y1 ≦ 0.25) and a thickness of about 10 nm to 500 nm, the third buffer layer has a composition represented by In y2 Al 1-y2 N (0.1 ≦ y2 ≦ 0.25) and a thickness of about 5 nm to 500 nm, a distance from an upper surface of the first buffer layer to an interface between the third buffer layer and the channel layer (5, 6) is about 15 nm to 1000 nm, and a value of y1 is larger than a value of y2, or the second buffer layer has a composition represented by In y1 Al 1-y1 N (0.1 ≦ y1 ≦ 0.25) and a thickness of about 10 nm to 500 nm, the third buffer layer has a composition represented by Al x2 Ga 1-x2 N (0.3 ≦ x2 ≦ 1) and a thickness of about 2 nm to 100 nm, and a distance from an upper surface of the first buffer layer to an interface between the third buffer layer and the channel layer (5, 6) is about 12 nm to 600 nm.