Unmanned aerial systems (UAS) with embedded machine learning applications are applied in various fields for autonomous aerial refueling (AAR), concept of parent-child UAV system, drone swarm, teaming of manned aircraft and UAV, package delivery, etc. The fundamental challenge of an air-to-air docking phase is securing between a leader and a follower aerial vehicles with effective target detection strategy. This paper proposes an autonomous docking system for unmanned aerial vehicle (UAV) system that detects, tracks, and docks to a drogue. The proposed system is operated on an onboard machine learning computer platform. This paper presents not only the design of a probe-and-drogue type of docking system based on bi-stable mechanism, but also the development of an onboard machine learning system for a simple and a robust mid-air docking. ARM-based computer, Jetson Xavier NX module, is used as a companion computer to perform a real-time detection and an autonomous control for the aerial vehicle. To employ an effective drogue detection, a deep learning convolutional neural network (CNN) based real-time object detection algorithm, YOLOv4 tiny, is applied. Furthermore, a point-cloud based tracking algorithm with a RGB-D camera system is developed to track the drogue movement in the air. Before conducting an outfield docking test, a performance of the proposed docking system is validated.