In practical applications, there are many task allocation problems involving the participation of self-interested agents, including Witkey, crowdsourcing and electronic markets. In these cases, to improve the efficiency of task allocation, a reasonable distribution of utilities is critical. To the best of our knowledge, few studies have examined the complex task allocation and utility distribution of self-interested agents, and good solutions are lacking. To address this issue, the following works are done in this paper: first, based on a task allocation model for self-interested agents and by studying the Nash bargaining solution and the bargaining characteristics of the agents, an efficiency utility distribution algorithm satisfying individual rationality and budget effectiveness is proposed. Second, based on the best response strategy of the self-interested agent, a complex task allocation algorithm for multiple self-interested agents is proposed. Finally, the effectiveness of the proposed algorithm is verified by comparing the system revenues with other utility distribution and task allocation algorithms.