Computational modeling is an essential approach in neuroscience for linking neural mechanisms to experimental observations. Recent advanced machine learning techniques, such as deep learning, leverage synthetic data generated from computational models to reveal underlying neural mechanisms from experimental data. However, despite significant progress, one unsolved problem in these methods is that the synthetic data differ substantially from experimental data, leading to severely biased results. To this end, we introduce the Domain Adaptive Neural Inference framework to construct synthetic data that closely resemble the distribution of experimental data and use the matching synthetic data to predict the neural mechanisms of experimental data. We demonstrate the accuracy, efficiency, and versatility of our framework in various experimental observations, including inferring single-neuron biophysics across mouse brain regions from intracellular recordings in the Allen Cell Types Database; inferring biophysical properties of a microcircuit of Cancer Borealis from extracellular recordings; and inferring monosynaptic connectivity of mouse CA1 networks from in vivo multi-electrode extracellular recordings. The framework outperforms state-of-the-art methods in every application, and can potentially be generalized to a wide range of computational modeling approaches in biosciences.