In this paper, a modified teaching–learning based optimization (TLBO) algorithm is introduced in order to solve the optimal power flow (OPF) considering the high voltage direct current (HVDC) link in power systems. In TLBO, there is an improper diversity among search learners; therefore, its convergence speed is lower in comparison with some other evolutionary algorithms. Hence, in order to improve the quality of the solutions and speed up the velocity convergence, the teacher phase is modified. Moreover, to balance the global and local search capability of TLBO, one of the most common mutation operations of the differential evolution algorithm is incorporated into learner phases. With these modifications, the trapping to the local minima of traditional TLBO is vastly improved and the trade-off between the global searching ability and the convergence rate is retained. In order to demonstrate the efficiency of the proposed optimization method, it is applied to the OPF problem of two different two-terminal HVDC systems, including the modified 5-bus system and the modified WSCC 9-bus system. The behavior of some optimization methods such as the Genetic Algorithm, Backtracking Search Algorithm, and Artificial Bee Colony algorithm as well as the CPU running time for the objective function is presented. Comparison results indicate that the proposed optimization method is reliable with higher quality solutions among other applied evolutionary algorithms.