Online peer-to-peer (P2P) lending has emerged as a result of the integration of finance and technology. Within the P2P lending market, individual investors have the opportunity to make repeated investments and engage in two-way transactions involving loans and investments. This setting provides an ideal scenario for studying the impact of different learning types on investors' risk management. Drawing on transaction data from the online lending platform Renrendai.com, we empirically examine the influence of role transition and investment practice on investors' risk identification, risk preference, and investment performance. We introduce variables related to loans and investment portfolios to analyze the effects. Our findings reveal that investment practice has a greater effect than role transition in reducing the investment default of online lending investors. Additionally, role transition is associated with a decrease in the investment amount set by investors and a reduced reliance on borrowers' credit ratings. Historical investment experience also leads to a decrease in the investment amount, while experiences of past investment failures improve investors' reference to borrowers' credit ratings. Furthermore, we observe that borrowing experience and previous investment failures contribute to a lower probability and proportion of high-risk loans in the portfolio. We shed light on the “black box” of investor learning and expand the research methodology for understanding investor behavior characteristics in the Fintech era.