Stock market prediction is an essential topic in economics. However, owing to the noise and volatility of the stock market, timely market prediction is generally considered one of the most challenging problems. Several researchers have introduced investor sentiment into stock prediction models and have achieved good results. Applying investor sentiment to high-frequency stock price forecasts can lead to risk aversion and improved returns. We have designed a model for high-frequency stock price prediction known as asymmetric embedding transformer (AEformer) that uses investor sentiment. We filtered stock comments using category information and enhanced the utilization of investor sentiment for stock prediction by incorporating an asymmetric embedding layer combined with a channel-wise independent self-attention mechanism. The experimental results show that AEformer outperforms the other models in high-frequency stock predictions using investor sentiment. Moreover, the asymmetric embedding layer is effective in improving the forecasting performance of transformer-based models.