A large number of small cells in the next-generation mobile networks is expected to be deployed to satisfy 5G requirements. Mobility management is one of the important issues that require considerable attention in heterogeneous networks, where 5G ultra-dense small cells coexist with the current 4G networks. An efficient handover (HO) mechanism is introduced to address this issue and improve mobility management by adjusting HO control parameters (HCPs), namely, time-to-trigger and HO margin. Dynamic HCPs (D-HCPs), which explores user experiences to adjust HCPs and make an HO decision in a self-optimizing manner, is proposed in this paper. D-HCPs classify HO failure (HOF) into three categories, namely, too late, too early and wrong cell HO, and simultaneously adjust HCPs according to the dominant HOF. The algorithm is evaluated using different performance metrics, such as HO ping-pong, radio link failure and interruption time, with different mobile speed scenarios. Simulation results show that the proposed D-HCPs algorithm adaptively optimizes the HCPs and outperforms other algorithms from the literature.