The short answer
Peruvian ceviche has the deeper documented roots, going back to the Andean coast. Mexican citrus-marinated seafood, including aguachile, developed separately. Both kinds of dish rely on citrus that reached the Americas with the Spanish, and exact dates are debated. The answer depends on which dish you mean.
If you have asked whether Peruvian food is like Mexican food, ceviche is one of the clearest examples of where the two differ.
Where ceviche started in Peru
Before the Spanish arrived, cooks on Peru’s coast cured fish in acidic liquids. The acid was probably fermented fruit juice, such as fermented tumbo, a passion fruit juice. Some accounts date the practice back thousands of years, but the evidence is debated, and popular stories often run ahead of it. Ecuador has also made an origin claim tied to its own coastal history.
The word “ceviche,” also written “cebiche,” has an uncertain origin. Some link it to a Quechua word for fresh fish, and others to the Spanish word escabeche, a type of pickle.
What changed when citrus arrived
Citrus fruit came to the Americas with the Spanish in the 1500s. Over time, lime and lemon came to replace fermented juices in many coastal dishes. Peruvian cooks added red onion, chili and a citrus marinade often called leche de tigre. The modern dish, served with sweet potato and choclo corn, took shape from there.
Mexican citrus-marinated seafood
Aguachile is a Mexican seafood dish from the northwest, and it is commonly linked to the state of Sinaloa. It is typically made with raw shrimp, lime, chiles, cucumber and onion. Some accounts say the original version relied more on chile and water, and that lime became common later. Mexico also has shrimp cocktail, which uses a tomato-based sauce and is often served with avocado. These are distinct dishes, not versions of one recipe.
Why the question is hard to settle
Both traditions use citrus, which arrived after the Spanish, and both have many regional versions. “Mexican ceviche” is a broad term, and restaurants may serve dishes with little in common. Many food writers credit Peru with the older tradition, but the exact timeline is not well documented. Treat any one-line answer with caution.
Differences you can taste
Peruvian ceviche is usually made with white fish such as sole or sea bass, lime, red onion, ají and cilantro. It is often served with sweet potato and corn. Mexican citrus seafood often uses shrimp or other shellfish, with lime, chile, cucumber and sometimes tomato or avocado. The mix of ingredients changes the flavor a great deal, even when the core is lime and fresh seafood.
Making it at home safely
Raw seafood carries a food safety risk. Buy fish from a source you trust, keep it cold until you use it, and cut it into pieces just before marinating. Marinate it briefly, since long soaking makes the fish tough and chalky. Eat it soon after making it. If you are pregnant, have a weakened immune system, or are unsure, skip the raw version or cook the seafood instead.