We investigate the shock acceleration of particles in massive galaxy mergers or collisions, and show that cosmic rays (CRs) can be accelerated up to the second knee energy ~0.1-1 EeV and possibly beyond, with a hard spectral index Gamma ~ 2. Such CRs lose their energy via hadronuclear interactions within a dynamical timescale of the merger shock, producing gamma rays and neutrinos as a by-product. If ~ 10 % of the shock dissipated energy goes into CR acceleration, some local merging galaxies will produce gamma-ray counterparts detectable by CTA. Also, based on the concordance cosmology, where a good fraction of the massive galaxies experience a major merger in a cosmological timescale, the neutrino counterparts can constitute ~ 20-60 % of the isotropic background detected by IceCube.