Combine chicken, onion, lemon slices, garlic, and rosemary together in a large bowl. Drizzle olive oil and sprinkle salt and black pepper over the chicken mixture; toss to coat. Spread chicken mixture out in the bottom of a baking dish.
Bake in the preheated oven until no longer pink at the bone and the juices run clear, 45 to 50 minutes. An instant-read thermometer inserted into the thickest part of a thigh, near the bone, should read 165 degrees F (74 degrees C).