It's not something I really expect us to get a proper answer to, but I think it's like Oracle said in that he forced the original Braig's heart out completely (which would lead to that heart to either return to KH, or become a heartless) or he simply suppressed his heart down to complete silence (like Roxas, Ventus, and Xion were inside Sora according to Ienzo). As for how he did this, well.... Yeah, I honestly can't come up with a good answer. My best guess would be used some kind of hax ancient magic known only to people from the age of fairytales, or perhaps it was just some generic darkness ability?