Imperial influence
Following the death of William VII, Marquess of Montferrat in 1292, Matteo expanded his influence westward, taking Casale, gaining the lordships of Novara and Vercelli, and the captaincy of Alessandria. His expansion was temporary as William's son, John of Monferrat, re-took Alessandria and forced the Ghibellines out of Novara and Vercelli.
Despite this setback, Matteo was appointed Imperial Vicar of Lombardy in 1294 by Adolf of Nassau. The next year, after the death of Ottone, a period of struggle for domination of Milan began anew between the Ghibellines (the supporters of the Kings of the Romans and Holy Roman Emperors and thus also of Matteo as Imperial Vicar) and the Guelphs, the partisans of the Pope led by the traditional enemies of the Visconti, the Della Torre family. In 1299, Albert I of Germany reappointed him as Imperial Vicar.
Matteo managed to remain at the helm of the city until June 1302, when Guido della Torre again took the lordship of Milan, through a league formed by the Torriani and the anti-Visconti families of the cities of Cremona, Pavia, Piacenza, Novara, Vercelli, Lodi, Crema, and Monferrato led by Alberto Scotti and Ghiberto da Correggio. Matteo's home in Milan was attacked and looted. Forced into exile, Matteo remained for several years a guest of the Scaliger family at Nogarola (Motteggiana).
In 1311, Matteo met the German King Henry VII at Asti and from this, received a mandate to reach a peace agreement in Lombardy. On 4 December that year, Matteo and the archbishop Cassone della Torre signed an agreement. Between December 1310 and February 1311, the German King, who was crowned King of Italy on 6 January by Cassone della Torre, tried to find common ground between the Torriani and Visconti. However, on 12 February, German soldiers of Henry VII faced an armed Torriani force, led by Guido della Torre, who did not accept the treaty between their cousin Cassone and Matteo. The King's forces prevailed and Guido della Torre fled Milan. Due to his suspected involvement in della Torre's downfall, Matteo was exiled for a time, but on 13 July 1311 King Henry sold the title of imperial vicar for Milan to Matteo. They then organized a league that included Milan, Como, Novara, Vercelli, Bergamo, Brescia, Lodi, Cremona, and Piacenza, which had all become Ghibelline cities loyal to the Emperor. Just over a year later, the Emperor died on 24 August 1313 at Buonconvento in Tuscany. In 1314, claiming descent from the fictitious counts of Angera, Matteo occupied Angera castle, property of the archbishop of Milan. He commissioned a fresco in the main hall of the castle which illustrated the victory of the Visconti family over Napoleone della Torre at the battle of Desio.