If you do something in a way that's not particularly smart or thoughtful, you do it unwisely. Your brother unwisely decided to ride his skateboard down the playground slide, and now he's got a cast on his arm.
Things that are done unwisely are foolish or lack judgment. If you unwisely decide to adopt a dozen dogs from the local shelter, you'll almost certainly regret it. And if you unwisely borrow your mom's car to drive to the mall, despite not having a driver's license, you'll be in deep trouble. We get unwisely from the prefix un-, "not," and the Old English source of wise, wis, "sagacious or prudent."