To humans, everything is classifiable-big versus small, edible or poisonous, righteous or unjust. Similarly, at the heart of most machine learning tasks lies the fundamental goal of classification, yet the enduring challenge of linear inseparability has plagued artificial neural networks since their inception. Here we asked how biological neural networks tackle this issue by investigating the geometric embedding of neural manifolds in macaques’ V2 during orientation discrimination of motion-induced illusory contour. Specifically, we constructed a three-dimensional stimulus space that inherently rendered the orientation classification of these contours as a linear-inseparable problem. As expected, we identified a sensory manifold, formed by the V2 neuron population, that faithfully corresponded to this stimulus space. Crucially, this sensory manifold underwent a series of twist operations, resulting in new axes orthogonal to the original ones. Within this expanded, high-dimensional perceptual manifold, the problem of linear inseparability became linearly separable. Computational modeling further revealed that the geometric transformation from the sensory to perceptual manifold was achieved by neurons exhibiting nonlinear mixed selectivity and heterogeneous connectivity patterns among them. Taken together, our findings elucidate how perception arises from sensation from a neural geometry perspective, enriching our understanding of how cognitive functions derive from underlying anatomical structure.