Sheep (Ovis dries L.) grazing on weeds and crop residue during the fallow period may enhance soil carbon (C) and nitrogen (N) through urine and faeces returned to the soil. We compared sheep grazing, tillage, and herbicide application as weed management practices on soil total C (STC), total N (STN), ammonium (N[H.sub.4.sup.+])-N, and nitrate (N[O.sub.3.sup.-])-N contents in a dryland 5-year crop rotation from 2012 to 2015 in the northern Great Plains, USA. The treatments were sheep grazing with no chemical input in organic crop production (GO), minimum tillage with chemical inputs (MT), and conventional tillage with no chemical input in organic crop production (TO). The 5-year crop rotation was safflower (Carthamus tinctorius L.)/sweet clover (Melilotus officinalis L.) cover crop-sweet clover cover crop-winter wheat (Triticum aestivum L.)--lentil (Lens culinaris L.)-winter wheat. At the 0-1.20 m depth, STC was 14-20 Mg C [ha.sup.-1] greater in GO than MT and TO, but STN was 2.1-2.2 Mg N [ha.sup.-1] greater in TO than GO and MT. The N[H.sub.4.sup.+]-N and N[O.sub.3.sup.-]-N contents were 5-21 kg N [ha.sup.-1] greater in MT than GO and TO. While STC and STN tended to increase with year for all treatments, N[H.sub.4.sup.+]-N and N[O.sub.3.sup.-]-N contents varied with treatments and years. Sheep grazing enhanced soil C storage, but had a variable effect on N storage and residual N compared to tillage and herbicide application for weed control. Additional keywords: carbon sequestration, crop rotation, integrated crop-livestock system, soil organic matter, soil residual nitrogen, weed management practice.