Vortex pinning is a crucial factor that determines the critical current of practical superconductors and enables their diverse applications. However, the underlying mechanism of vortex pinning has long been elusive without a clear microscopic description1,2. Here using high-resolution scanning tunneling microscopy, we studied single vortex pinning induced by point defect in layered FeSe-based superconductors. We found the defect-vortex interaction drives low-energy vortex bound states away from EF, resulting a “mini” gap which effectively lowered the system energy and caused the pinning. By measuring the local density-of-states, we directly obtained the elementary pinning energy and estimated the pinning force through the spatial gradient of pinning energy. The results align with the bulk critical current measurement. We further show that a general microscopic quantum model with considering defect-vortex interaction can naturally capture our observation. It indicates the local pairing near pinned vortex core is actually enhanced, which is beyond the traditional understanding that non- superconducting regions pin vortices1-3. Our study thus reveals a general microscopic mechanism of vortex pinning in superconductors, and provides guidance for enhancing the critical current of real superconductors.