As an extension of cloud computing paradigm, fog computing has attracted wide attention due to its advantages of low energy consumption, short time delay and high bandwidth saving. In order to construct a green and long lifetime Internet of Things (IoT), this paper proposes a fairness and energy co-aware computation offloading for fog-assisted IoT. Specifically, based on the joint consideration of fog node’s computing capacity and bandwidth resource and the offloading decision with energy consumption fairness, an optimization problem is formulated to minimize the total energy consumption of all computation tasks. A Momentum Gradient and Coordinate Collaboration Descent based Fair Energy Minimization Algorithm (MGCCD-FEM) is proposed to solve above mixed integer nonlinear programming problem. Namely, first, based on the historical average energy consumption, distance, computing capacity and residual energy of fog node, a fair index is designed to obtain the offloading decision with the optimal energy consumption fairness. Then, based on the obtained optimal offloading decision, the minimization of the total energy consumption for processing all the tasks can be achieved by jointly optimizing the occupation ratios of computing and bandwidth resources with the developed momentum gradient and coordinate collaboration descent method. Finally, the simulation results show that the proposed scheme can achieve faster convergence speed. Meanwhile, compared with other two benchmark schemes, the total energy consumption of this scheme is the lowest, the energy consumption fairness of fog node is the highest, and the network lifetime is enhanced by 23.6% and 31.2% on average, respectively.