In the nitride semiconductor device of the present invention, an active
layer 12 is sandwiched between a p-type nitride semiconductor layer 11 and
an n-type nitride semiconductor layer 13. The active layer 12 has, at
least, a barrier layer 2a having an n-type impurity; a well layer 1a made
of a nitride semiconductor that includes In; and a barrier layer 2c that
has a p-type impurity, or that has been grown without being doped. An
appropriate injection of carriers into the active layer 12 becomes
possible by arranging the barrier layer 2c nearest to the p-type layer
side.