In this paper, we develop a dynamic production-inventory control model to determine the optimal production planning for a manufacturer facing stochastic demand and carbon emission allowance price under cap and trade. We derive several structural properties of the model, and characterize the optimal production policies that minimize the expected total discount cost over a finite planning horizon. Specifically, when there is no setup cost for production, the optimal production policy is a hybrid version of two base stock policies; when there has setup cost, the optimal production policy is a hybrid version of a (s, S) and a generalized (s, S) policy.