We propose schemes to entangle two quantum dots (QDs) with the aid of Majorana fermions via optimal control. Two paradigmatic cases, the teleportation and the intradot spin flip processes, are considered, respectively, in the charge and spin degrees of QDs. We demonstrate that optimal control techniques can be effectively used to prepare entanglement between two QDs through manipulating their chemical potentials. Significantly, our optimal control generation of entangled states has a prominent advantage: The runtime is much shorter than in adiabatic passage, providing a shortcut to adiabatic entanglement preparation.