Due to the current environmental situation and human health, a green manufacturing system is very essential in the manufacturing world. Several researchers have developed various types of green manufacturing models by considering green products, green investments, carbon emission taxes, etc. Motivated by this topic, a green production model is formulated by considering selling price, time, warranty period and green level dependent demand with a carbon emission tax policy. Also, the production rate of the system is an unknown function of time. Per unit production cost of the products is taken as increasing function of production rate and green level of the products. In our proposed model, carbon emission rate is taken as linear function of time. Then, an optimization problem of the production model is constructed. To validate of our proposed model, a numerical example is considered and solved it by AHA. Further, other five metaheuristics algorithms (AEFA, FA, GWOA, WOA and EOA) are taken to compare the results obtained from AHA. Also, concavity of the average profit function and convergence graph of different metaheuristics algorithms are presented. Finally, a sensitivity analysis is carried out to investigate the impact of different system parameters on our optimal policy and reach a fruitful conclusion from this study.