The correlation coefficient is the unconditional simple relationship between Y and x1 . The regression coefficient is the conditional impact on Y GIVEN x2,x3,x4,and x5. They would have the same sign if x1,x2,x3,x4,x5 were orthogonal (uncorrelated) with each other. As @Whuber correctly reflected, if they are not orthogonal they may or may not have signs that are the same.
EXPANDED ANSWER TO MAKE IT MORE CONSTRUCTIVE:
Consider the following data set where the simple correlation between Y and X1 is positive Let is analyze Y as a function of X1 and X2 . First separately then together. The regression coefficient of the unconditional relationship between Y and M_X1 is .463 ( same sign as the simple correlation ) while the conditional impact of M_X1 given M_X2 is -1.222 (different sign ). As others have pointed out this is sometimes referred to as "
the expected sign fallacy ', "Simpson's paradox" , "Ecological fallacy " etc. In summary conditional analysis (multiple regression) is often different from unconditional analysis (simple regression) because the predictor variables are not independent of each other.