This thesis addresses the feasibility of the production of ultra-high-energy cosmic rays in starburst galaxies and active galactic nuclei. These astrophysical objects were theoretically proposed as candidate sources a long time ago. Nevertheless, the interest in them has been recently renewed due to the observational data collected by the Pierre Auger Observatory and the Telescope Array. In this work, a comprehensive review of the current status of the research on cosmic rays accelerators is provided, along with a summary of the principal concepts needed to connect these relativistic particles with electromagnetic and neutrino observations in the multi-messenger era. On one hand, the hypothesis of accelerating particles with energies above 10¹ eV in starburst superwinds is carefully revisited, taking into account the constraints imposed by the most recent electromagnetic observations. On the other hand, an alternative new model for the gamma emission of the nearby active galaxy NGC 1068 is presented. The implications of the results of these studies are discussed in terms of the contemporary observatories and prospects for future experiments are offered.