The electronic properties and thermal conductivity of carbon nanotubes (CNTs) are investigated by using density functional theory (DFT), tight binding theory and Green function approach. The effects of the impurity type, concentration, external electric and magnetic fields on the density of state (DOS) and thermal conductivity are calculated. The results show that by the temperature increasing, the thermal conductivity increases for pure and doped structures. The thermal conductivity of CNTs with boron and nitrogen (B/N) doping atoms is smaller than that of pure CNT. The electric and magnetic fields increase the κ(T) for all structures with a difference between their absolute values. The strength of the thermal conductivity strongly depends on the electric field strength rather than a magnetic field strength.