Preheat oven to 350 degrees F (175 degrees C). Lightly grease a 9x13-inch baking dish.
Arrange half the sweet potatoes in the bottom of the prepared baking dish. Layer with half of the peach slices and dot with half the butter. Repeat layering with remaining sweet potatoes and peach slices and sprinkle with lemon juice. Combine the brown sugar, ginger, and salt and mix well.
Sprinkle the sugar mixture over the potatoes and peaches. Dot the casserole with remaining butter, and pour in the liqueur (see Cook's Note). Cover pan with aluminum foil.
Bake in the preheated oven until sweet potatoes are tender, about 1 hour. Remove foil, sprinkle with pecans, and continue baking 10 to 15 minutes, until pecans are toasted and fragrant.