The liner shipping industry is suffering from a huge number of empty containers to be repositioned due to the global trade imbalance. The transport of reverse flow of empty containers (around 20% of total containers shipping) does not generates profit and represent an additional cost in the logistics process. Here, we present a time-indexed network flow model taking into account forward and reverse flows of containers. Given the inherent symmetry and the combinatorial nature of the problem, we resort to a hybrid metaheuristic, based in Reactive GRASP and Q-Learning algorithms to solve larger instances of the problem. Our computational results confirm that the proposed solution method is quite efficient taking into account the time and solution quality.