Methods to affinity purify proteins are widely used in protein research. One important application is to identify interacting proteins of an affinity-purified protein of interest (POI) by mass spectrometry. Here, we developed an optogenetics-derived and light-controlled affinity purification method based on the light-regulated reversible protein interaction between phytochrome B (PhyB) and its phytochrome interacting factor 6 (PIF6). We engineered a truncated variant of PIF6 comprising only 22 amino acids that can be genetically fused to the POI as an affinity tag. Thereby the POI can be purified with PhyB-functionalized resin material using 660 nm light for binding and washing and 740 nm light for elution. As proof-of-concept, we expressed PIF-tagged variants of the tyrosine kinase ZAP70 in ZAP70-deficient Jurkat T cells, purified ZAP70 and associating proteins using our light-controlled system and identified the interaction partners by mass spectrometry