A theoretical model of axial misfit stress relaxation in core-shell nanowires with hexagonal cross section of the core through the nucleation of prismatic dislocation loops is suggested. Different nucleation sites of the loops in core-shell nanowires are considered. The energy change caused by the loop nucleation is calculated. The critical condition for the onset of the loops is given and analyzed in detail. The most favorable sites in nanowires and the optimal loop shape are defined.