Due to the flight characteristics such as small size, low noise, and high efficiency, studies on flapping wing robots are being actively conducted. In particular, the flapping wing robot is in the spotlight in the field of search and reconnaissance. Most of the research focuses on the development of flapping wing robots rather than autonomous flight. However, because of the unique characteristics of flapping wings, it is essential to consider the development of flapping wing robots and autonomous flight simultaneously. In this article, we describe the development of the flapping wing robot and computationally efficient vision-based obstacle avoidance algorithm suitable for the lightweight robot. We developed a 27 cm and 45 g flapping wing robot named CNUX Mini that features an X-type wing and tailed configuration to attenuate oscillation caused by flapping motion. The flight experiment showed that the robot is capable of stable flight for 1.5 min and changing its direction with a small turn radius in a slow forward flight condition. For the obstacle detection algorithm, the appearance variation cue is used with the optical flow-based algorithm to cope robustly with the motion-blurred and feature-less images obtained during flight. If the obstacle is detected during straight flight, the avoidance maneuver is conducted for a certain period, depending on the state machine logic. The proposed obstacle avoidance algorithm was validated in ground tests using a testbed. The experiment shows that the CNUX Mini performs a suitable evasive maneuver with 90.2% success rate in 50 incoming obstacle situations.