This paper explores the complex logistics of ship routing and scheduling for fertilizer companies in Brazil, considering the challenges posed by a dynamic international trade landscape affected by factors such as the COVID-19 pandemic and geopolitical conflicts. It expands previous research by incorporating cargo allocation to the heterogeneous fleet in the cargo routing and scheduling problem, which is critical for the contemporary operating scenario. The primary objective is to minimize transportation costs by optimizing ship routes, schedules, and cargo allocation to compartments, while addressing specific operational constraints, such as the capacity of ships' compartments, delivery delays, change of direction in a ship's route on the Brazilian coast, segregated storage, and ship stability. Considering the complexity of the generated models for real-life problems, a Lagrangian-based solution method, incorporating a modified relax-and-fix matheuristics and several heuristics to improve the solution process of mixed-integer linear programming solvers, is developed. Experimentation with previous real-life instances reveals that the optimization method obtains implementable operational plans with transportation costs reduced by 47.66%, on average, compared to the amounts paid by companies for sea freight services. A case study demonstrates the applicability of the optimization approach as a decision-support tool for real-life planning.