This paper investigates the hitting time of a Cox risk process. The relationship between the hitting time of the Cox risk process and the classical risk process is established and an explicit expression of the Laplace–Stieltjes transform of the hitting time is derived by the probability method. Similarly, we derive the explicit expression of the Laplace–Stieltjes transform of the last exit time. Further, we study the situation when the intensity process is an -state Markov process.