PurposeAlthough the literature has somewhat discussed social capital and knowledge sharing, the mediating and moderating mechanisms that influence team workers to move from connecting with one another to building social capital and consequently engaging in knowledge sharing still remain largely understudied. For that reason, this study aims to develop a holistic research framework that links social capital to knowledge sharing with positive affective tone as a mediator and hypercompetition as a moderator.Design/methodology/approachDrawing upon the social capital theory and the affective events theory (AET), this study proposes a research framework to assess how social capital factors influence knowledge sharing with the mediation of positive affective tone and the moderation of hypercompetition in high-tech teams. This study obtains survey data based on 330 questionnaires of working professionals from 66 high-tech teams in Taiwan, in which each team comprises four members and their team leader.FindingsThe empirical results of this study show that social interaction, shared vision and trust are positively related to knowledge sharing via the mediation of positive affective tone. Moreover, hypercompetition has positive moderating effects on the relationships between social interaction and positive affective tone as well as between trust and positive affective tone.Originality/valueThis study expands the previous literature to study through what mediating mechanism the effects of different social capital factors on knowledge sharing can be effectively realized and whether there exists any critical moderator that influences these effects.