BACKGROUNDRice is often rotated with dryland crops to produce sufficient foodstuff, as rice is the main food crop of humans. In order to verify whether under the intensive rice‐based cropping system, high yield and good quality of rice can be achieved simultaneously to ensure food security. Five long‐term paddy–upland rotations – wheat–rice (WR), rapeseed–rice (RR), garlic–rice (GR), broad beans–rice (BR) and potato–rice (PR) – were conducted from 2014 to investigate rice yield, along with the profiling of 24 elements in rice grain.RESULTSMg, Zn, Cu, As, Mo and Sb concentrations were highest in the aleurone layer, and Ag and Cd concentrations showed little variation among different parts of the rice grain. Al, Ti, V, Si, Fe and Tl concentrations in the endosperm under GR were higher, while the Se concentration under PR was the highest. Furthermore, the yield of GR and PR were higher than the other three rotations with N supplementation, and the sustainable yield index of PR and WR were larger than 0.8.CONCLUSIONWhen we consider the concentration of toxic (As, Cd and Pb) and nutrient elements (Ca, Fe, Zn, Se, Cu and Mg) in the endosperm and grain yields, PR can simultaneously achieve high yield, high nutrition and low toxicity with different nitrogen treatments. Here we provide novel insights regarding the selection of rice‐based cropping systems, focused on producing nutritious and safe rice with high grain yield. © 2024 Society of Chemical Industry.