Motivation, Opportunity, and Ability (MOA) are three factors that influence employees’ performance and have been accepted widely in the literature, but there is no agreement on the interactions between these three factors in shaping the performance. Therefore, proposing a model for connecting these factors to performance is interesting. All of the previous models are designed based on the regression analysis. This paper aims to apply mathematical programming in this issue for the first time. Knowledge sharing as a proper area and bi-level programming as an extendable framework selected for developing such a model. We implemented our model in General Algebraic Modeling System (GAMS) with randomly generated data for 100 employees. Outputs of optimization model analyzed by SPSS regression analysis. Based on the results obtained in the statistical analysis, predicted performance by the proposed bi-level programming model has a behavior close to the results reported by the previous empirical research. Future research can test the proposed model using empirical data in comparison to currently available regression models.