Let S be a semigroup S with an involution ⁎:S→S satisfying (x⁎)⁎=x and (xy)⁎=y⁎x⁎ for all x,y∈S. Given a,b,c∈S, we say that a is (b,c)-core invertible if there exists an x∈S such that caxc=c, xS=bS and Sx=Sc⁎. It is proved that such an x is unique whenever it exists. In this case, x is called the (b,c)-core inverse of a. This provides a unified framework for the Moore–Penrose inverse, core inverse and w-core inverse, where w∈S. Several characterizations of the (b,c)-core inverse are derived. For instance, it is proved that a is (b,c)-core invertible if and only if a is (b,c)-invertible and c is {1,3}-invertible. Also, we introduce the dual (b,c)-core inverse and obtain some results dual to those on the (b,c)-core inverse. An element y∈S is called the dual (b,c)-core inverse of a if byab=b, yS=b⁎S and Sy=Sc. We show that a is both (b,c)-core and dual (b,c)-core invertible if and only if a is (b,c)-invertible and cab is Moore–Penrose invertible. Finally, (b,c)-core inverses and dual (b,c)-core inverses are investigated in a ring with an involution.