When conventional methods have become insufficient to handle computationally complicated problems, nature-inspired optimization methods were proposed and widely accepted in recent years. In this work, we investigate the trade-off between risk and return in a cardinality-constrained portfolio optimization problem and applied an artificial bee colony (ABC) method as the solution approach. It would be the first attempt of ABC on this application. The proposed ABC algorithm employs a hybrid encoding that mixes integer and real variables to fulfill the characteristic of the portfolio optimization problem. The generation of solutions involves three groups of bees: employed bees, onlooker and scouts that balance the effects of exploration and exploitation. The study tests the performance of the proposed ABC algorithm on four global stock market indexes provided by the OR-Library. Computational results of ABC are compared with simulated annealing (SA), tabu search (TS), and variable neighborhood search (VNS) methods in the literature. Evidences indicate that ABC performs better in terms of diversity, convergence, and effectiveness among all three test data sets; therefore, ABC demonstrates its potential on portfolio optimization.