This paper presents an elitism-crossover barnacle mating optimization (ECBMO). It is an improvement of barnacle mating optimization (BMO). The original BMO suffers from local optima problem leading to a low accurate solution. A new method of offspring generation is adopted into the original BMO structure. Some features of the best-so-far solution are incorporated into the generated offspring. The accuracy performance of the proposed algorithm is tested on several IEEE functions. A statistical analysis is conducted to compare its performance over the original BMO. It is also applied to optimize proportional integral derivative (PID) parameters for controlling output voltage of a buck converter. Result of benchmark functions test shows the proposed algorithm has attained higher accuracy for all functions compared to BMO algorithm. Application on the real problem shows both algorithms control the converter voltage satisfactorily. However, the ECBMO has achieved more optimal PID parameters and leading to a better output voltage response.