To support a vast number of devices with less energy consumption, we propose a new user association and power control scheme for machine to machine enabled heterogeneous networks with non-orthogonal multiple access (NOMA), where a mobile user (MU) acting as a machine-type communication gateway can decode and forward both the information of machine-type communication devices and its own data to the base station (BS) directly. MU association and power control are jointly considered in the formulated as optimization problem for energy efficiency (EE) maximization under the constraints of minimum data rate requirements of MUs. A many-to-one MU association matching algorithm is firstly proposed based on the theory of matching game. By taking swap matching operations among MUs, BSs, and sub-channels, the original problem can be solved by dealing with the EE maximization for each sub-channel. Then, two power control algorithms are proposed, where the tools of sequential optimization, fractional programming, and exhaustive search have been employed. Simulation results are provided to demonstrate the optimality properties of our algorithms under different parameter settings.