The trick is purple Chaos Drives, and lots of them. Feed your chao nothing but purple drives while it is still a baby, then keep the purple-only diet going after it evolves into its neutral form.
Watch the back of its head as it grows. When strange protrusions start to appear there while it is still a baby, you are on the right track. Stay consistent, because slipping in a different colour partway through will steer the chao toward a different alignment.