How a black hole accretes matter and how this process is regulated are fundamental but unsolved questions in astrophysics. In transient black-hole binaries, a lot of mass stored in an accretion disk is suddenly drained to the central black hole because of thermal-viscous instability. This phenomenon is called an outburst and is observable at various wavelengths (Frank et al., 2002). During the outburst, the accretion structure in the vicinity of a black hole shows dramatical transitions from a geometrically-thick hot accretion flow to a geometrically-thin disk, and the transition is observed at X-ray wavelengths (Remillard, McClintock, 2006; Done et al., 2007). However, how that X-ray transition occurs remains a major unsolved problem (Dunn et al., 2008). Here we report extensive optical photometry during the 2018 outburst of ASASSN-18ey (MAXI J1820$+$070), a black-hole binary at a distance of 3.06 kpc (Tucker et al., 2018; Torres et al., 2019) containing a black hole and a donor star of less than one solar mass. We found optical large-amplitude periodic variations similar to superhumps which are well observed in a subclass of white-dwarf binaries (Kato et al., 2009). In addition, the start of the stage transition of the optical variations was observed 5 days earlier than the X-ray transition. This is naturally explained on the basis of our knowledge regarding white dwarf binaries as follows: propagation of the eccentricity inward in the disk makes an increase of the accretion rate in the outer disk, resulting in huge mass accretion to the black hole. Moreover, we provide the dynamical estimate of the binary mass ratio by using the optical periodic variations for the first time in transient black-hole binaries. This paper opens a new window to measure black-hole masses accurately by systematic optical time-series observations which can be performed even by amateur observers.