Context. Coronal mass ejections (CMEs) are the main driver of solar wind disturbances near the Earth. When directed toward Earth, the internal magnetic field of the CME can interact with the Earth’s magnetic field and cause geomagnetic storms. In order to better predict and avoid damage coming from such events, the optimized heliospheric model Icarus has been implemented. Advanced numerical techniques, such as gradual radial grid stretching and solution adaptive mesh refinement (AMR) are implemented in the model to achieve better performance and more reliable results. Aims. The impact of a CME at Earth is greatly affected by its internal magnetic field structure. The aim of this work is to enable the modeling of the evolution of the magnetic field configuration of the CME throughout its propagation in Icarus. Thus, we used Icarus to implement a magnetized CME model that is more realistic than the already available simple hydrodynamics cone CME model, allowing us to study the evolution of the magnetized CME during its interactions with the solar wind. The focus of the study is on the global magnetic structure of the CME and its evolution and interaction with the solar wind. Methods. The magnetized CME model implemented in Icarus is the linear force-free spheromak (LFFS) solution that has been imported from EUHFORIA. Simulations with the spheromak model were performed for different effective resolutions of the computational domain. We applied advanced techniques such as grid stretching and AMR. Different AMR levels were applied in order to obtain high resolution locally, where needed. The original uniform medium- and high-resolution simulation results are also shown as a reference. The results of all the simulations are compared in detail and the wall-clock times of the simulations are provided. Results. We analyzed the results from the performed simulations. The co-latitudinal magnetic field component is plotted at 1 AU for both Icarus and EUHFORIA simulations. The time series at Earth (L1) of the radial velocity, density, and different magnetic field components are plotted and compared. The arrival time is better approximated by the EUHFORIA simulation, with the CME shock arriving 1.6 and 1.09 h later than in the AMR level 4 and 5 simulations, respectively. The profile features and variable strengths are best modeled by Icarus simulations with AMR level 4 and 5. The uniform, medium-resolution simulation with Icarus took 6.5 h wall-clock time, whereas with EUHFORIA, the most similar setup takes 18.5 h, when performed on 1 node with 2 Xeon Gold 6240 CPUs at 2.6 GHz (Cascadelake), 18 cores each, on the Genius cluster at KU Leuven. The Icarus simulation with AMR level 4 took only 2.5 h on the same computer infrastructure, while showing better resolved shocks and magnetic field features, when compared to the observational data and the referene uniform simulation results. Conclusions. The results from different Icarus simulations in Icarus are presented using results from the EUHFORIA heliospheric modeling tool as a reference. The arrival time is closer to the observed time in the EUHFORIA simulation, but the profiles of the different variables show more features and details in the Icarus simulations. The simulations with AMR levels 4 and 5 offered the most detailed results. Considering the small difference in the modeled results and the large difference in terms of computational resources, the AMR level 4 simulation is considered to have displayed the most optimal performance. The gradients in the AMR level 4 results are sharper than those in the uniform simulations with both EUHFORIA and Icarus, while the AMR level 4 effective resolution is the most comparable to the standard resolution runs. The AMR level 3 simulation is 15 and 41 times faster than the Icarus and EUHFORIA uniform simulations, respectively; while the AMR level 4 simulation is about three and seven times faster than the uniform simulations, respectively.