Restructuring and liberalisation of the electricity industry creates opportunities for investment in energy storage, which could be undertaken by a profit-maximising merchant storage operator. Because such a firm is concerned solely with maximising its own profit, the resulting storage-investment decision may be socially suboptimal (or detrimental). This paper develops a bi-level model of an imperfectly competitive electricity market. The modelling framework assumes electricity-generation and storage-operations decisions at the lower level and storage investment at the upper level. Our analytical results demonstrate that a relatively high (low) amount of market power in the generation sector leads to low (high) storage-capacity investment by the profit-maximising storage operator relative to a welfare maximiser. This can result in net social welfare losses with a profit-maximising storage operator compared to a no-storage case. Moreover, there are guaranteed to be net social welfare losses with a profit-maximising storage operator if the generation sector is sufficiently competitive. Using a charge on generation ramping between off- and on-peak periods, we induce the profit-maximising storage operator to invest in the same level of storage capacity as the welfare-maximising firm. Such a ramping charge can increase social welfare above the levels that are attained with a welfare-maximising storage operator.