Start the coals or heat a gas grill for medium-high indirect cooking; a three-zone fire is preferable if you are using a gas grill. Make sure the grates are clean. If using charcoal, put a deep drip pan under the indirect side of the grill; for gas, empty, clean, and replace the fat trap.
Trim excess fat and skin from the duck (there will be lots of it; freeze it to render later). Avoid exposing the meat. With a sharp knife, cut slashes into the skin (particularly across the breast and around where the thigh and leg meet) without slicing all the way down to the flesh; this will help render the fat as the duck cooks. Pat the duck dry with paper towels, then sprinkle on all sides with salt and pepper.
Put the duck, breast side up, on the indirect side of the grill parallel to the fire; make sure it is positioned entirely over the drip pan if using charcoal, or clear of the flames and pilot lights on a gas grill. Close the lid and cook until the internal temperature at the thigh, away from the bone, is 170°F, 2 to 2 1/2 hours, depending on the size of the duck. If you are using a two-zone fire, after about 1 hour rotate the duck 180 degrees for even cooking.
Transfer the duck to a cutting board and let rest for 5 to 10 minutes before carving. While the duck rests, whisk the hoisin sauce, oil, sherry, and sugar together in a small bowl.
To carve the duck, first cut the breast halves from the breastbone, then slice them across into several pieces so everyone can have a taste. Then cut off the wings, legs, and thighs as you would a chicken, locating the joints and cutting through them. Cut away and discard the rib cage of the duck, then cut across the back in three or four pieces. (There are some succulent tidbits tucked in there.) Serve the dipping sauce with the duck.