The crude oil offloading and supply problem (COSP) is a type of operation maritime inventory routing (MIR) problem encountered by petroleum companies. In COSP, the company not only is responsible for the ship scheduling to carry the crude oil from production sites to discharge ports but also must maintain inventory levels at both ports (production and consumption) between safety operational bounds to avoid disruptions in its crude oil production and/or refining processes. We show how to improve significantly the decision-making process in a Brazilian petroleum company using a mixed-integer linear programming (MILP) model to represent COSP. Comparison tests with a current ship-scheduling method adopted in the company indicated that the use of the MILP model increased the transportation efficiency and reduced costs by 20% on average. In addition to the quantitative gains, the use of a MILP model to solve COSP has succeeded when encountering real-life events, such as variation in production or consumption rates, berth unavailability, and changes in the storage capacities at ports.