Agriculture sector is a major contributor to global greenhouse gases (GHGs) emission and thus to anthropogenic climate change. In the proposed system, we used soil attributes, i.e., soil type, soil humidity, soil temperature, Ph value, soil moisture, and climatic attributes, i.e., temperature, humidity, wind speed, pressure, and location to analyze and predict the emission of greenhouse gases CO2 and CH4 from Pune, India. We used different regression techniques and deep learning model to analyze and predict the emission of CO2 and CH4 for different crops and season wise also. The result indicated that the decision tree regressor gives good result, Root Mean Square Error (RMSE) values 0.032930 and 0.026116 for emission of CO2 and CH4 as compared to other algorithm used. The deep learning model works best for 4 layers of sequential neural network. The RMSE values for number of epoch 1000 with different layers are 13.18, 7.87, and 10.36. Thus the effect of soil and climate attributes makes the difference in the greenhouse gas emission from agriculture field. © 2021, The Editor(s) (if applicable) and The Author(s), under exclusive license to Springer Nature Singapore Pte Ltd.