Magnetic resonance imaging (MRI) is a well-known and widespread imaging modality for neuroscience studies and the clinical diagnoses of neurological disorders, mainly due to its capability to visualize brain microstructures and quantify various metabolites. Additionally, its noninvasive nature makes possible the correlation of high-resolution MRI from ex vivo brain samples with histology, supporting the study of neurodegenerative disorders such as Alzheimer's or Parkinson's disease. However, the quality and resolution of ex vivo MRI highly depend on the availability of specialized radiofrequency coils with maximized filling factors for the different sizes and shapes of the samples to be studied. For instance, small, dedicated radiofrequency (RF) coils are not always commercially available in ultrahigh field whole-body MRI scanners. Even for ultrahigh field preclinical scanners, specific RF coils for ex vivo MRI are expensive and not always available. Here, we describe the design and construction of two RF coils based on the solenoid geometry for ex vivo MRI of human brain tissues in a 7T whole-body scanner and for ex vivo MRI of marmoset brain samples in a 9.4T preclinical scanner. We designed the 7T solenoid RF coil to maximize the filling factor of human brain samples conditioned on cassettes for histology, while the 9.4T solenoid was constructed to accommodate marmoset brain samples conditioned in 50 ml centrifuge tubes. Both solenoid designs operate in transceiver mode. The measured B1+ maps show a high level of homogeneity in the imaging volume of interest, with a high signal-to-noise ratio over the imaging volume. High-resolution (80 µm in plane, 500 µm slice thickness) images of human brain samples were acquired with the 7T solenoid, while marmoset brain samples were acquired with an isotropic resolution of 60 µm using the 9.4T solenoid coil.