At the breeding grounds of most baleen whales the patchiness and gaps in spatial distribution results from interactions between behavior patterns and environmental conditions. We evaluated the influence of environmental factors (bathymetry and distance from shore with quadratic terms, and wind speed), effort, and spatial autocorrelation effects to predict humpback whale group density in the Southwest Atlantic Ocean. Count data of groups by grid cells were fitted with conditional autoregressive models (CAR). Bayesian inference was performed via integrated nested Laplace approximation. The best-fit model contained distance from shore and its quadratic term, bathymetry, and the autoregressive component. Occupancy probability was high for the Abrolhos Bank, some cells from the northeast continental shelf and southeast margin, but gaps in occurrence were identified. High densities were estimated in the east continental margin, with the highest density in the Abrolhos Bank, in some cells of the northeast continental margin and in the southernmost area. We report that intermediate distances from the coast, and shallow waters were preferred for breeding and calving activities. We suggest that CAR models may incorporate aggregation mechanisms into habitat modeling and may provide advances in marine mammal analyses by accounting for residual autocorrelation.