A two-step method with high-efficiency is developed to prepare nitrogen doped activated carbons (NACs) with high surface area and nitrogen content. Based on the method, series of NACs with similar surface area and pore texture but different nitrogen content and nitrogen group species are successfully prepared. The influence of nitrogen doping on electrochemical performance of carbon/sulfur composites cathode is studied deeply under the conditions of similar surface area and pore texture. It presents the directly experimental demonstration that both nitrogen content and nitrogen group species play crucial roles on electrochemical performance of carbon/sulfur composites cathode. NAC/sulfur composites show the much improved cycling performance, which is about 3.5 times as that of nitrogen free carbon. Improved electrochemical performance is due to synergistic effects between nitrogen content and effective nitrogen groups, which enables effective trapping of lithium polysulfides within carbon framework. Besides, it is found that oxygen groups exist in carbon materials obviously influence electrochemical performance of cathode, which could be ignored in most of studies. Based on above, it can be concluded that enhanced chemisorption to lithium polysulfides by functional groups modification is the effective route to improve the electrochemical performance of Li-S battery.