In real life, a good reputation generally brings positive returns to individuals. For example, merchants with numerous good reviews usually gain higher profits. Considering this in the ultimatum game, we propose a reputation-based reward mechanism to investigate the evolution of fairness. Specifically, individuals' reputations evolve dynamically based on the outcomes of games. At the same time, we set a reputation threshold in the population. When individuals' reputations exceed the reputation threshold, they are considered excellent. Otherwise, they are ordinary. The excellent individuals can receive extra rewards compared to the ordinary ones. Finally, individuals' total payoffs determine their fitness within the population. Based on these settings, this paper mainly explores how reputation threshold, weight factor and reward strength affect the evolution of fairness. Through a series of simulations, the reputation-based rewards mechanism is proved to effectively promote the fairness in the population. To be specific, we find that higher reputation thresholds and smaller values of weight factor significantly enhance the promotion effect of reward on fairness. Simultaneously, there is a specific correspondence between the reputation threshold and the weight factor. When reward strength is fixed, for different reputation thresholds, the optimal value of weight factor to achieve maximum fairness levels also varies. Additionally, increasing reward strength can significantly promote fairness.