Wash and dry mahimahi. Pour 1/2 tablespoon oil in a large skillet. Heat over medium-high heat. Lay fish in oil and cook 4 to 5 minutes per side, flipping one time; fish should be golden on both sides, but still moist looking in the middle. Move to a shallow dish.
Using the same skillet, heat the rest of the oil over medium-high heat. Cook onions until golden, about 8 minutes. Pour onion overtop of fish.
In same skillet, mix together vinegar, allspice, peppercorns, bay leaf, garlic, salt, sugar, and 1 1/4 cups water; let boil. Take off of heat and spoon overtop of fish. Let rest until cooled; wrap in plastic wrap and refrigerate at least 8 hours or up to 1 day.
When ready to serve, remove from refrigerator and bring to room temperature. Serve using a slotted spoon.