Layer potatoes on aluminum foil with onion, butter, basil, and garlic. Season with salt and pepper. Fold foil around potatoes to make a packet; seal well.
Place packet on the preheated grill over indirect heat and cook until potatoes are tender, about 30 minutes. Turn over packet halfway through cooking.