Despite China's emissions having plateaued in 2013, it is still the world's leading energy consumer and CO2 emitter, accounting for approximately 30% of global emissions. Detailed CO2 emission inventories by energy and sector have great significance to China's carbon policies as well as to achieving global climate change mitigation targets. This study constructs the most up-to-date CO2 emission inventories for China and its 30 provinces, as well as their energy inventories for the years 2016 and 2017. The newly compiled inventories provide key updates and supplements to our previous emission dataset for 1997-2015. Emissions are calculated based on IPCC (Intergovernmental Panel on Climate Change) administrative territorial scope that covers all anthropogenic emissions generated within an administrative boundary due to energy consumption (i.e. energy-related emissions from 17 fossil fuel types) and industrial production (i.e. process-related emissions from cement production). The inventories are constructed for 47 economic sectors consistent with the national economic accounting system. The data can be used as inputs to climate and integrated assessment models and for analysis of emission patterns of China and its regions.