The thermal stability of devices based on GaN, AlN, and Al0.5Ga0.5N semiconductors is a critical property for efficient and reliable operation. The thermal conductivity of these materials has anisotropic nature. We proposed an approach for calculating the anisotropic thermal conductivity based on harmonic and anharmonic interatomic force constants of a lattice. The thermal-conductivity coefficient of GaN, AlN, and Al0.5Ga0.5N in the , , and  directions were calculated using ab initio methods by solving the linearized Boltzmann transport equation. It equals λ = 259.28, λ = 335.96 and λ = 309.56 W/(m·K) for GaN; λ = 396.06 , λ = 461.65 and λ = 435.05 W/(m·K) for AlN; and λ = 186.74, λ = 165.24 and λ = 177.62 W/(m·K) for Al0.5Ga0.5N at 300 K. The dependence of the coefficient λ(T) on temperature in the range from 250 to 750 K is presented. A comparative analysis of the GaN thermal conductivity investigations has been carried out for experimental studies and theoretical calculations.