Context. Various binary black hole formation channels have been proposed since the first gravitational event GW150914 was discovered by the Advanced Laser Interferometer Gravitational-Wave Observatory (AdLIGO). The immediate progenitor of the binary black hole is a close binary system composed of a black hole and a helium star, which can be the outcome of the classical isolated binary evolution through the common envelope, or alternatively of the massive close evolution through chemically homogeneous channel. Aims. We study the spin angular momentum evolution of the helium star in order to constrain the spin of the second-born black hole. This work focuses on the common envelope formation channel, however, some of our conclusions are also relevant for the chemically homogeneous evolution channel. Methods. We perform detailed stellar structure and binary evolution calculations that take into account, mass-loss, internal differential rotation, and tidal interactions between the helium star and the black hole companion, where we also calculate the strength of the tidal interactions from first principles based on the structure of the helium stars. We systematically explore the parameter space of initial binary properties, including initial black hole and helium star masses, initial rotation of the helium star as well as metallicity. Results. We argue that the natal spin of the first-born black hole through the common envelope scenario is negligible (≲0.1), and therefore the second-born black hole’s spin dominates the measured effective spin, χeff, from gravitational wave events of double black hole mergers. We find that tides can be only important when orbital periods are shorter than 2 days. Upon core collapse, the helium star produces a black hole (the second-born black hole in the system) with a spin that can span the entire range from zero to maximally spinning. We show that the bimodal distribution of the spin of the second-born black hole obtained in recent papers is mainly due to oversimplifying assumptions. We find an anti-correlation between the merging timescale of the two black holes, Tmerger, and the effective spin χeff. Finally, we provide new prescriptions for the tidal coefficient E2 for both H-rich and the He-rich stars. Conclusions. To understand the spin of the second-born black hole, careful treatment of both tides and stellar winds is needed. We predict that, with future improvements to AdLIGO’s sensitivity, the sample of merging binary black hole systems will show an overdensity of sources with positive but small χeff originating from lower-mass black hole mergers born at low redshift.