TOKYO—Japan said Friday it would investigate five utilities’ refusal to accept more electricity from large solar-power providers, underscoring the nation’s struggle to manage a boom in solar production that started two years ago.

A 2012 law required power companies to buy electricity from approved solar projects at rates well above what they pay for electricity from other sources. The law led many investors to rush into solar power and take advantage of the high guaranteed price.

In recent weeks, five Japanese utilities that operate relatively small grids said they were temporarily blocking new solar projects from hooking up to the grid. The utilities said their grids could be put at risk because of the volatility of solar facilities, which can produce a large volume of electricity on clear days and then drop abruptly to zero when dusk falls.

The law allows them to keep new projects offline if there is a risk of power disruption.

Industry minister Yuko Obuchi said her ministry would convene a panel to come up with solutions by the end of the year.