I had nearly the same problem with my 06 Highlander. No loud noise, just one day the moonroof refused to close. Bummer in the

or

The moonroof would keep reversing, not allowing it to shut. I could only "inch" it closed by tapping the control switch. I did the following:
1. "Inch" the moonroof closed by tapping the switch.
2. Reset the control switch to Manual mode by holding the moonroof switch in the closed position until it tilts up, continue to hold for 10 seconds. Now it is in Manual mode (you have to hold the switch to make it move in either direction).
3. Now that I had manual control, I opened it up and carefully cleaned the tracks, the rubber seal around the glass, the painted exterior roof parts where the seal rubs, the wind deflector especially where it contacts the glass, etc, with a paper towel dampened with a mild cleaner (I used Trader Joes Cedarwood and Sage). This definitely removed some grit and grime.
4. Then I greased the "ramp" part of the wind deflector with a thin film of lithium grease. I did not grease the aluminum tracks as they did not appear to have any OEM grease on them and I didn't want to collect dirt there. I found it helpful to move the glass around at will in the manual mode.
5. I applied Armorall to the rubber seal all the way around the glass.
6. Lastly I returned the control to Automatic so that one push opens or closes the window: Open the moonroof, then hold the switch in the closed position until it goes through this entire cycle: closes, tilts up, tilts down, opens, closes once more... then continue to hold for 2 more seconds. Now it's back in Automatic.
7. Voila! it works!
So I'm not really sure if cleaning or resetting the switch fixed it but it was a good opportunity for a little maintenance that I wouldn't of thought about normally!
Thanks for help, cmurf, leading me to this thread, and to LifeTech for getting me started and the OEM repair manual pages of instructions.

Now where did those TSB's go I hear others talking about?