Abstract Compound eyes (CEs) that feature ultra-compact structures and extraordinary versatility have revealed great potential for cutting-edge applications. However, the optoelectronic integration of CEs with available photodetectors is still challenging because the planar charge-coupled device (CCD)/complementary metal oxide semiconductor (CMOS) detector cannot match the spatially distributed images formed by CE ommatidia. To reach this end, we report here the optoelectronic integration of CEs by manufacturing 3D nonuniform ommatidia for developing an ultra-compact on-chip camera. As a proof-of-concept, we fabricated microscale CEs with uniform and nonuniform ommatidia through femtosecond laser two-photon photopolymerization, and compared their focusing/imaging performance both theoretically and experimentally. By engineering the surface profiles of the ommatidia at different positions of the CE, the images formed by all the ommatidia can be tuned on a plane. In this way, the nonuniform CE can be directly integrated with a commercial CMOS photodetector, forming an ultra-compact CE camera. Additionally, we further combine the CE camera with a microfluidic chip, which can further serve as an on-chip microscopic monitoring system. We anticipate that such an ultra-compact CE camera may find broad applications in microfluidics, robotics, and micro-optics.