Expensive power cost is a significant concern in today’s manufacturing world. Reduction in energy consumption is an ultimate measure towards achieving manufacturing efficiency and emissions control. In the existing literature of scheduling problems, the consumption of energy is considered uncertain under the dimensions of uncertain demand and supply. In reality, it is a random parameter that also depends on production capacity, manufacturing technology, and operational condition of the manufacturing system. As the unit production cost varies with production rate and reliability of the manufacturing system, the energy consumption of the system also varies accordingly. Therefore, this study investigated an unreliable manufacturing system under stochastic production capacities and energy consumption. A stochastic production–inventory policy is developed to optimize production quantity, production rate, and manufacturing reliability under variable energy consumption costs. As energy consumption varies in different operational states of manufacturing, we consider three specific states of power consumption, namely working, idle, and repair time, for an integrated production–maintenance model. The considered production system is subjected to stochastic failure and repair time, where productivity and manufacturing reliability is improved through additional technology investment. The robustness of the model is shown through numerical example, comparative study, and sensitivity analysis of model parameters. Several graphical illustrations are also provided to obtain meaningful managerial insights.