Failure mode (FM) recognition and remaining useful lifetime (RUL) prediction play pivotal roles in the field of prognostics and health management (PHM), particularly in regard to monitoring machinery degradation. Advances in sensor technology have opened avenues for FM recognition and RUL prediction by leveraging data from multiple sensors. However, previous research has exhibited certain limitations. Some studies have taken all multisensor data as direct inputs, overlooking the potential heterogeneity in the relevance of individual sensor data to machinery degradation. Others have relied on visual inspection and subjective assessments for sensor selection. These approaches struggle to adaptively select sensors, especially in scenarios involving multiple FMs and operating conditions (OCs), and when only partial FM labels are available. To address these challenges, this paper proposes a novel deep-learning network that adaptively selects sensors to jointly recognize FMs and predict RUL under time-varying OCs. The core of this network incorporates an attention-based long short-term memory (LSTM) module. Within this module, adaptive sensor selection weights are generated, leading to the accurate recognition of FMs and the precise prediction of the RUL. In the context of model training, we construct loss functions utilizing semilabeled samples and extract OC-invariant features through domain adaptation, enhancing the accuracy of FM recognition and RUL prediction. To assess the effectiveness and the generalizability of the proposed method, numerical experiments and two case studies involving aircraft engines and bearings are conducted Note to Practitioners-This paper proposes a deep-learning network designed for adaptive sensor selection in the context of semisupervised FM recognition and RUL prediction, particularly in scenarios involving multiple OCs. To operationalize this method, five key steps are outlined: First, Data Collection: data are gathered from multiple sensors, time-varying OCs, multiple FMs, and failure time of historical units. It is important to note that FM data are available for only a subset of historical units. Second, Data Preprocessing: The sensor data are tailored using the sliding time window technique, generating a substantial number of samples from historical units. Third, Network Construction: Subsequently, the adaptive sensor selection network is constructed. Fourth, Model Training: Loss functions are constructed, and model parameters are estimated through end-to-end training. Finally, Model Application: The method is utilized to recognize FMs and predict RUL for in-service units. This deep learning network can be applied effectively to various degraded machines experiencing multiple FMs and OCs. It is particularly suitable for machines with complex physical mechanisms or unknown failure thresholds.