We present the results of a temporal and spectral analysis of the transient source ULX-4 in the galaxy M51. The data used were drawn from Chandra, XMM-Newton, and Swift-XRT archives, spanning the years 2000-2019.. The X-ray flux of the source is seen to vary by two orders of magnitudes within a month but a short-term variability was not observed over the time intervals of 100-2000 s in the 0.3-10 keV energy band. We find some evidence for the existence of bi-modality feature in the flux distribution of ULX-4. We identified two optical sources as possible counterparts within an error radius of 0.'' 18 at 95 per cent confidence level for ULX-4 based on the archival Hubble Space Telescope (HST)/ACS and HST/WFC3 data. Blackbody fits of the spectral energy distributions (SEDs) indicate the spectral type to be B-type stars. One of these counterparts exhibits a low-amplitude optical periodicity of 264 +/- 37 d in the F606W filter; if we assume this apparent periodicity is associated with the orbital motion of the donor, then it is more likely that the donor is a red supergiant satisfying the long periodicity and accretion via Roche lobe overflow. Consequently, the SED would then have to be interpreted as a superposition of emissions from a cold donor and a hot flow component, most likely from an accretion disc. If, on the other hand, the periodicity is superorbital in nature i.e. due to possible interactions of the compact object with a circumstellar disc, the donor could then be a Be/X star hosting a neutron star.