In the present paper we demonstrate the approach of using a holographic grating on a freeform surface for advanced spectrographs design. We discuss the surface and groove pattern description used for ray-tracing. Moreover, we present a general procedure of diffraction efficiency calculation, which accounts for the change of hologram recording and operation conditions across the surface. The primary application of this approach is the optical design of the POLLUX spectropolarimeter for the LUVOR mission project where a freeform holographic grating operates simultaneously as a cross-disperser and a camera with high resolution and high dispersion. The medium ultraviolet channel design of POLLUX is considered in detail as an example. Its resolving power reaches [126,000-133,000] in the region of 118.5-195 nm. Also, we show a possibility to use a similar element working in transmission to build an unobscured double-Schmidt spectrograph. The spectral resolving power reaches 4000 in the region 350-550 nm and remains stable along the slit.