Uncertainty is a highly important aspect of maritime transportation. Unforeseen occurrences related to environmental conditions, poor weather, vessel reliability, or port congestion are frequent and have a non-negligible impact on the total time required for vessels to perform (un)loading operations at ports. We study a special case of maritime transportation named the maritime inventory routing (MIR) problem, in which one must determine the routings of vessels while keeping the inventory levels at ports within the operational limits. In this paper, we propose a robust optimization approach that considers the uncertainty in the total time spent by vessels at the ports. This approach allows the trade-off between the risk of infeasibility (i.e., violating inventory limits at ports) and the increase in operational costs due to the protection against uncertainty events to be assessed. To test the proposed methodology, we used a real-world instance based on the MIR problem faced by a Brazilian petroleum company. In this problem, violating the inventory limits at ports causes considerable financial losses due to consequent interruptions in crude oil production. Our approach supports the decision maker to devise more robust plans in which the risk of violating inventory limits is acceptable. In other words, despite the increase in the operational costs associated with more robust solutions, the approach enables the decision maker to avoid much larger potential costs. For the problem considered, we observed that the probability of infeasibility of the proposed solution may be reduced from 87% to 2%, depending on the level of robustness adopted by the decision maker. However, this increased protection causes an increase of up to 13% in the overall costs.