Patterning of diamond-like carbon (DLC) and DLC:metal nanocomposites is of interest for an increasing number of applications. We demonstrate a nanoimprint lithography process based on silicon containing thermoplastic resist combined with plasma etching for straightforward patterning of such films. A variety of different structures with few hundred nanometer feature size and moderate aspect ratios were successfully realized. The quality of produced patterns was directly investigated by the means of optical and scanning electron microscopy (SEM). Such structures were further assessed by employing them in the development of gratings for guided mode resonance (GMR) effect. Optical characterization of such leaky waveguide was compared with numerical simulations based on rigorous coupled wave analysis method with good agreement. The use of such structures as refractive index variation sensors is demonstrated with sensitivity up to 319 nm/RIU, achieving an improvement close to 450% in sensitivity compared to previously reported similar sensors. This pronounced GMR signal fully validates the employed DLC material, the technology to pattern it and the possibility to develop DLC based gratings as corrosion and wear resistant refractometry sensors that are able to operate under harsh conditions providing great value and versatility.