We describe the endocranial structures of Hamadasuchus, a peirosaurid crocodylomorph from the late Albian-Cenomanian Kem Kem group of Morocco. The cranial endocast, associated nerves and arteries, endosseous labyrinths, and cranial pneumatization, as well as the bones of the braincase of a new specimen, are reconstructed and compared with extant and fossil crocodylomorphs, which represent different lifestyles. Cranial bones of this specimen are identified as belonging to Hamadasuchus, with close affinities with Rukwasuchus yajabalijekundu, another peirosaurid from the 'middle' Cretaceous of Tanzania. The endocranial structures are comparable to those of R. yajabalijekundu but also to baurusuchids and sebecids (sebecosuchians). Paleobiological traits of Hamadasuchus, such as alert head posture, ecology, and behavior are explored for the first time, using quantitative metrics. The expanded but narrow semi-circular canals and enlarged pneumatization of the skull of Hamadasuchus are linked to a terrestrial lifestyle. Continuing work on the neuroanatomy of supposedly terrestrial crocodylomorphs needs to be broadened to other groups and will allow to characterize whether some internal structures are affected by the lifestyle of these organisms.