The development of competitive Na- and Mg-ion batteries (NIBs and MIBs) with performance comparable to Li-ion batteries is hindered by the major challenge of finding advanced electrode materials. In this work, nanostructured TiS2 electrodes including nanosheets, nanoribbons and nanotubes are shown by first principles calculations to achieve improved Na and Mg ion diffusion as compared with the bulk phase. Comparative studies between Li, Na, and Mg reveal that the diffusion kinetics of Na ions would especially benefit from the nanostructure design of TiS2. More specifically, the Na ion diffusivity turns out to be considerably higher than Li ion diffusivity, which is opposite to that observed in bulk TiS2. However, in the case of Mg ions, fast diffusion is still beyond attainment since a relatively high degree of interaction is expected between Mg and the S atoms. Edge-induced modifications of diffusion properties appear in both Na and Mg ions, while the mobility of Li ions along the ribbon edges may not be as appealing. Effects of the curvature of nanotubes on the adsorption strength and ion conductivity are also explored. Our results highlight the nanostructure design as a rich playground for exploring electrodes in NIBs and MIBs.