Rotation period is one of the key parameters that determines the climate of a planet, which suggests that determining the rotation period of the terrestrial exoplanets is important to find habitable worlds. However, the existing methods to detect the rotation period of exoplanets are not suitable for terrestrial exoplanets. In this study, we propose that under certain conditions, the rotation period of an Earth-like exoplanet is detectable using direct-imaging techniques. ExoCAM GCM is used to simulate the reflected starlight from an Earth-like exoplanet and to explore how different parameters (e.g. observing direction, wavelength, time resolution) influence the detectability of the rotation period of the exoplanet. Our results provide useful guidance for the rotation period detection of Earth-like exoplanets. For example, we show that the rotation period of an Earth-like exoplanet will be relatively easy to detect if the space telescope has a signal-to-noise ratio higher than 20 and uses the visible channels to observe the exoplanet. Meanwhile, since the exoplanets within the habitable zones of the low-mass stars tend to be tidally locked in a short time (~ 1 Gyr), rotation period detection of Earth-like exoplanets may put constraints on the age of exosolar systems.