Generating recommendation reasons for recommended items can play an essential role in personalization such as by summarizing users’ comments on their purchased items. However, existing methods only utilize general recommendations, ignoring the fact that items purchased by users are often related to their purchase history. To address this issue, we propose a multitask model referred to as Explanation Generated for Sequential Recommendation (EG4SRec), which is designed to generate recommendation reasons based on a Transformer model for sequential recommendations. First, we predicted and recommended items based on the time series information from the user’s purchase history. Additionally, we used the proposed method to generate recommendation reasons for a target user based on these features by assigning linguistic meaning to the user’s purchase history and the items they may be interested in buy. Moreover, we applied context prediction to generate features for recommendation reasons. The results of experiments conducted using the constructed review dataset, which includes approximately 1. 29M explanations from the Yelp dataset, show that the proposed approach is reasonably effective for sequential recommendations. The model achieved performance similar to that of an existing SOTA model in terms of the evaluation matrix and performed even better in some other terms.