Preheat the oven to 450°F. Line a rimmed baking sheet with parchment paper.
Discard the giblets from the chicken then stuff the cavity with the lemon quarters. Pat the outside of the chicken dry with paper towels and place on the lined baking sheet breast-side up.
Add the garlic, basil, pine nuts, salt, and pepper to a food processor and pulse well until a paste is formed. Scrape the mixture into a bowl and stir in the Parmesan and olive oil until well combined.
Spread the pesto mixture all over the chicken and under the skin as best as you can.
Roast the chicken in the oven for 20 minutes then reduce the heat to 375°F and roast for about 60 more minutes or until chicken is cooked through (165°F internal temperature).
Take the chicken out of the oven and allow to rest for 15 minutes before slicing and serving.