Preheat the oven to 375°F (190°C).
Trim the ends of the zucchini and halve each lengthwise. Use a spoon to scoop out the seeds and some flesh to create boats, and set the scooped flesh aside or discard.
Heat the olive oil in a skillet over medium heat. Add the chopped onion and minced garlic and sauté until the onion is translucent, about 7–10 minutes.
Add the shredded cooked chicken and marinara sauce to the skillet. Stir and cook until heated through, about 3–4 minutes. Season with salt and pepper to taste.
Place the zucchini halves cut-side up in a baking dish. Divide the chicken and marinara filling evenly among the zucchini boats.
Sprinkle the shredded mozzarella evenly over each stuffed zucchini.
Bake in the preheated oven until the zucchini is tender and the cheese is bubbly and golden, about 30 minutes.
Garnish with chopped fresh basil if using, and serve immediately.